Dave Verwer wrote:
> Jean-François wrote:
>> If you want to set only for a given model :
>> 
>> class Foo < ActiveRecord::Base
>>   self.record_timestamps = false
>> end
> 
> Perfect! I can turn that off and then back on around my field update.
> 
> Thankyou

I have a requirement where I want to disable automatic update of 
updated_at field _only_ when certain attribute is changed. This is 
because I am I am maintaining a view_count field in the database which 
increments everytime the user visits a page. The count needs to be 
tracked but when I update view_count field, rails updates the updated_at 
field too. I want to stop that just for the field view_count. Any 
solution?


Chirantan
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to