Adam Roth
2006-Oct-04 18:21 UTC
Turning off magic columns (updated_at, created_at) possible?
Is there a way to turn off "magic column" functionality (updated_at, created_at, etc...)? For example, I recently ran a script to save the latitude/longitude of all of my users based on their zip codes. Everything worked fine, then I realized all of the user''s updated_at columns were changed. Damn! I forgot about that. While I want these columns to "just work" in most cases, is there a way to turn it off on demand? I doubt there is a built in feature -- but maybe somebody has an idea. Thanks. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Adam Roth
2006-Oct-04 18:24 UTC
Re: Turning off magic columns (updated_at, created_at) possi
Adam Roth wrote:> Is there a way to turn off "magic column" functionality (updated_at, > created_at, etc...)? > > For example, I recently ran a script to save the latitude/longitude of > all of my users based on their zip codes. Everything worked fine, then I > realized all of the user''s updated_at columns were changed. Damn! I > forgot about that. While I want these columns to "just work" in most > cases, is there a way to turn it off on demand? I doubt there is a built > in feature -- but maybe somebody has an idea. Thanks.From the docs: "This behavior can be turned off by setting ActiveRecord::Base.record_timestamps = false." -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---