search for: old_

Displaying 3 results from an estimated 3 matches for "old_".

Did you mean: old
2007 May 10
0
Counterintuitive behavior in ActiveRecord I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_
I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_driver=trip.driver trip.driver=alice In this example, who is old_driver? If you guessed Alice, you''re right. Inside associations.rb, the mutator is defined as: define_method("#{reflection.name}=") do |new_value| association = instance_variable_get("...
2010 Oct 22
0
Overriding to_s method of BIgDecimal
I am overriding to_s method of BigDecimal class as below and its working fine. Wanted to confirm is there any other better way to do this ? Thanks! 49 class BigDecimal 50 alias :old_s :to_s 51 def to_s 52 return to_i.to_s if eql? to_i 53 self.old_s 54 end 55 end -- sαη∂ιρ Rαηѕιηg --- blog www.funonrails.com twitter @sandipransing skype sandip.ransing -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&quo...
2006 Dec 07
2
need to transfer data from old php like db to rails style db
hey all, I have two tables like that from an old php project: artists(id,name) albums(id,artist_id,album_name) and I need to transfer the data of this database to three tables that look like this: artists(id,name) albums(id,name) artists_albums(album_id,artist_id) any idea what''s the fastest query to do this? thanx in advance Pat --~--~---------~--~----~------------~-------~--~----~