This seems like blasphemy but their is a situation where I do not want updated_at to be updated on update... I know I know... but is their a way? -- John Kopanas john-Iau1QiYlxLpBDgjK7y7TUQ@public.gmane.org Blog: http://www.kopanas.com Conference: http://www.cusec.net Twits: http://www.twitter.com/kopanas --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
felipekk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-23 01:07 UTC
Re: Suppressing updated_at from being updated
Don''t know if this will work, but try making a before_update filter that finds the original object with the original updated_at and set the object to that value... something like def before_update original_record = Model.find(self.id) self.updated_at = original_record.updated_at end Again, I don''t know if this is going to work. I''m guessing that the updated_at is set by Rails after your before_update filter... On Dec 22, 4:47 pm, "John Kopanas" <kopa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This seems like blasphemy but their is a situation where I do not want > updated_at to be updated on update... I know I know... but is their a way? > > -- > John Kopanas > j...-Iau1QiYlxLpBDgjK7y7TUQ@public.gmane.org > > Blog:http://www.kopanas.com > Conference:http://www.cusec.net > Twits:http://www.twitter.com/kopanas--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 23 Dec 2007, at 00:47, John Kopanas wrote:> This seems like blasphemy but their is a situation where I do not > want updated_at to be updated on update... I know I know... but is > their a way?You want to fiddle with ActiveRecord::Base.record_timestamps Fred> > > -- > John Kopanas > john-Iau1QiYlxLpBDgjK7y7TUQ@public.gmane.org > > Blog: http://www.kopanas.com > Conference: http://www.cusec.net > Twits: http://www.twitter.com/kopanas > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---