Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4706

Show
Ignore:
Timestamp:
08/07/06 06:54:22 (2 years ago)
Author:
marcel
Message:

Add documentation for how to disable timestamps on a per model basis. Closes #5684. [matt@mattmargolis.net Marcel Molina Jr.]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/CHANGELOG

    r4690 r4706  
    11*SVN* 
     2 
     3* Add documentation for how to disable timestamps on a per model basis. Closes #5684. [matt@mattmargolis.net Marcel Molina Jr.]  
    24 
    35* Don't save has_one associations unnecessarily.  #5735 [Jonathan Viney] 
  • trunk/activerecord/lib/active_record/timestamp.rb

    r4511 r4706  
    55  # Timestamping can be turned off by setting 
    66  #   <tt>ActiveRecord::Base.record_timestamps = false</tt> 
     7  # 
     8  # Keep in mind that, via inheritance, you can turn off timestamps on a per 
     9  # model basis by setting <tt>record_timestamps</tt> to false in the desired 
     10  # models. 
     11  # 
     12  #   class Feed < ActiveRecord::Base 
     13  #     self.record_timestamps = false 
     14  #     # ... 
     15  #   end 
    716  # 
    817  # Timestamps are in the local timezone by default but can use UTC by setting