hi
has anyone got a acts_as_versioned or acts_as_audited that supports the models associtions ?
like the acts_as_versioned_association but this doesnt work in rails 2 + ?
Also can you use globalize2 with any of these plugins ?
Does anyone have any experience using versions and globalize2 ?
thanks alot
rick
...
I have several embedded linux systems that I want to write a 'Who's Online?' network service in Ruby. Below is related part of my code:
mySocket = UDPSocket.new
mySocket.bind("<broadcast>", 50050)
loop do
begin
text, sender = mySocket.recvfrom(1024)
puts text
if text =~ /KNOCK KNOCK/ then
begin
sock = UD...
hi
I want to use a postgres database for 2 rails projects and for some php blogs. Does anybody have tips for me, which pg gem I should install for ruby?
I'm searching also for some general postgres config tips.
I run Ubuntu 9.04 as Server.
Maybe a (not outdated) good tutorial would be great :)
thanks guys
...
Are there any examples on the web of how to monitor delayed_job with Monit?
Everything I can find uses God, but I refuse to use God since long running processes in Ruby generally suck. (The most current post in the God mailing list? God Memory Usage Grows Steadily.)
Update: delayed_job now comes with a sample monit config based on thi...
hi
i am trying to get my head around the best way to develop an app in ruby on rails
i have a ducument creation system that for each document has multiple associations ie text docs, images, optional accessories etc. I have created this system now to do CRUD.
The next thing i want to do is have each document able to be translated into...
How to activate and Deactivate the Rails code hyperlink using JQuery for the following code
<%= f.add_associated_link "Add another email address",:class => 'add' %>
please suggest me to solve this major problem
...
I have a hash like this:
{
1=>["a", "b"],
2=>["c"],
3=>["a", "d", "f", "g"],
4=>["q"]
}
How can I iterate it in order to get:
1-----
a
b
2-----
c
3-----
a
d
f
g
...
I have a configuration class in Ruby that used to have keys like "core.username" and "core.servers", which was stored in a YAML file just like that.
Now I'm trying to change it to be nested, but without having to change all the places that refer to keys in the old way. I've managed it with the reader-method:
def [](key)
namespace, *r...
I noticed that class variables @@my_class var are now looked up in the context of the instance_eval'd object in Ruby 1.9.1 whereas this was not the case in Ruby 1.8.6.
What are some other differences in behaviour of instance_eval for Ruby 1.9.1 ?
...
Have Addresses and Lists with many-to-many relationship, as shown below.
Sometimes need all the Lists an Address is not in.
Using the find_by_sql query shown, and it works great. But is there a way to do it without using direct SQL?
class List
has_many :address_list_memberships
has_many :addresses, :through => :address_list_member...
I was trying to speed up multiple FTP downloads by using threaded FTP connections. My problem is that I always have threads hang. I am looking for a clean way of either telling FTP it needs to retry the ftp transaction, or at least knowing when the FTP connection is hanging.
In the code below I am threading 5/6 separate FTP connection...
In Ruby 1.8.6, I have an array of, say, 100,000 user ids, each of which is an int. I want to perform a block of code on these user ids but I want to do it in chunks. For example, I want to process them 100 at a time. How can I easily achieve this as simply as possible?
I could do something like the following, but probably there's an ...
In Perl you can do:
my $current_time = DateTime->now();
my $mdy = $current_time->mdy("/");
What's the easiest way to do this in Ruby?
...
I'd like to parse a simple table into a Ruby data structure. The table looks like this:
http://img232.imageshack.us/img232/446/picture5cls.png
Edit: Here is the HTML
and I'd like to parse it into an array of hashes. E.g.,:
schedule[0]['NEW HAVEN'] == '4:12AM'
schedule[0]['Travel Time In Minutes'] == '95'
Any thoughts on how to do ...
Is there an easy way to convert a Nokogiri XML document to a Hash?
Something like Rails' Hash.from_xml.
...
Hi,
I have 2 models 'item' and 'activity'. An 'item' can have many 'activities' (limited number of activities, used by all items).
To make it clearer: this is represented by a table with one item per row, one activity per column and something/nothing on the intersection if a line exists in the table matrices.
to see an image (worth a 1...
I want to add a twitter feed for a specific keyword search to my rails application. Where should I start?
...
My company has this Huge Database that gets fed with (many) events from multiple sources, for monitoring and reporting purposes. So far, every new dashboard or graphic from the data is a new Rails app with extra tables in the Huge Database and full access to the database contents.
Lately, there has been an idea floating around of having...
When should a lambda or proc be used? I have seen them described as anonymous functions, but I am struggling to understand this concept. I would appreciate any links to or examples of when you might use one in ruby, but especially in rails.
Thanks
...
I have an active record class
class Service_Catalogue < ActiveRecord::Base
set_table_name "service_catalogue"
set_primary_key "myKey"
end
myKey is an nvarchar (sql server).
When I try and save it
service_catalogue= Service_Catalogue.new()
service_catalogue.myKey = "somevalue"
service_catalogue.save
I get the fol...