Brian Morearty
c56e314866
Updates to ActiveRecord::Timestamp documentation.
...
Change ActiveRecord::Base.xyz to config.active_record.xyz in docs.
Remove <tt> from code samples.
Update skip_time_zone_conversion_for_attributes code sample: put the call in the model class.
Clarify that skip_time_zone_conversion_for_attributes skips converion when reading.
2011-02-05 09:07:00 -08:00
Franck Verrot
a5b03e9c7a
Implement and test private method all_timestamp_attributes_in_model
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-02-02 12:45:14 -02:00
Franck Verrot
5178e64175
Added timestamp_attributes_for_create_in_model
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-02-02 12:44:53 -02:00
Pratik Naik
573fd39e22
Make sure Model#touch doesn't try to update non existing columns
2010-12-30 18:42:18 +00:00
Josh Kalderimis
d7db6a8873
class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-11-20 19:40:29 +01:00
Pratik Naik
18b6aa6538
Make should_record_timestamps? serialization aware rather than object#changed?
2010-11-02 01:45:30 +00:00
José Valim
6ef60bd9ff
Ensure timestamps are not generated when explicitly set to false [ #5440 state:resolved]
2010-08-24 10:45:16 -03:00
José Valim
e4943e93c2
Make update_attribute behave as in Rails 2.3 and document the behavior intrinsic to its implementation.
2010-08-12 12:04:16 -03:00
Xavier Noria
4dc2521028
Merge remote branch 'docrails/master' into 3-0-stable
2010-08-03 02:15:12 +02:00
Neeraj Singh
1ce40ca562
ensuring that description does not exceed 100 columns
2010-08-02 12:25:26 -04:00
José Valim
b613c3cc7b
Add an internal (private API) after_touch callback. [ #5271 state:resolved]
2010-08-02 16:16:46 +02:00
Neeraj Singh
e42945333b
moving time zone related documentation to timestamp.rb from base.rb
2010-07-29 10:37:38 -04:00
Neeraj Singh
8bb3b634c0
Timestamp columns of HABTM join table should record timestamps
...
[#5161 state:resolved]
2010-07-21 14:45:36 +02:00
José Valim
3401311562
Tidying up a bit, so update_attribute is not called twice on touch.
2010-07-13 08:05:09 +02:00
Neeraj Singh
1d45ea0814
with this fix touch method - does not call validations - doest not call callbacks - updates updated_at/on along with attribute if attribute is provided - marks udpated_at/on and attribute as NOT changed
...
[#2520 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-13 07:03:42 +02:00
José Valim
87f64ef05e
Improve a bit the code in latest commits.
2010-07-08 22:59:41 +02:00
Neeraj Singh
01629d1804
This patch changes update_attribute implementatino so:
...
- it will only save the attribute it has been asked to save and not all dirty attributes
- it does not invoke callbacks
- it does change updated_at/on
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:43:18 +02:00
Neeraj Singh
690352dce4
consolidating updated_at and updated_on
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:41:58 +02:00
Rizwan Reza
4e3eec3d01
Adds title and proper formatting to docs.
2010-06-16 22:22:35 +04:30
wycats
d916c62cfc
eliminate alias_method_chain from ActiveRecord
2010-05-09 02:37:52 +03:00
Joshua Peek
4e50a35fa2
Break up DependencyModule's dual function of providing a "depend_on" DSL and "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
2009-05-28 11:35:36 -05:00
Bryan Helmkamp
a2875bec9a
Use DependencyModule for included hooks in ActiveRecord
2009-05-11 22:23:47 -04:00
David Heinemeier Hansson
abb899c54e
Added :touch option to belongs_to associations that will touch the parent record when the current record is saved or destroyed [DHH]
2009-04-16 17:25:55 -05:00
David Heinemeier Hansson
fdb61f02c5
Added ActiveRecord::Base#touch to update the updated_at/on attributes with the current time [DHH]
2009-04-16 16:48:37 -05:00
Luis Hurtado
63aac33833
Ensure of Model#create support custom updated_at and updated_on attributes [ #1612 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-12-22 15:19:33 +00:00
Jeremy Kemper
97019f9f5a
Partial updates play nice with updated_at/on timestamps
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:49:57 +00:00
Jeremy Kemper
6b9448cdd2
Partial updates include only unsaved attributes. Off by default; set YourClass.partial_updates = true to enable.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 01:10:04 +00:00
Pratik Naik
ca9413674e
Improve documentation.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-26 12:27:52 +00:00
Jeremy Kemper
1370d15787
Make the record_timestamps class-inheritable so it can be set per model. References #10004 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-26 22:45:03 +00:00
Marcel Molina
7143d80147
Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-08 03:37:16 +00:00
Jeremy Kemper
c7c867ebd2
Revert [4706] which added incorrect docs. References #5684 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-19 22:15:28 +00:00
Jeremy Kemper
07d8f46b85
Consistent public/protected/private visibility for chained methods. Closes #7813 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 02:14:31 +00:00
Rick Olson
1a11bffde1
Don't create instance writer methods for class attributes. Closes #7401 [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 01:31:31 +00:00
Marcel Molina
883c54a317
Add documentation for how to disable timestamps on a per model basis. Closes #5684 . [matt@mattmargolis.net Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-07 06:54:22 +00:00
Jeremy Kemper
5fe64dd1a6
r4724@asus: jeremy | 2006-06-28 19:22:46 -0700
...
Removed deprecated timestamps_gmt class methods.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4511 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 02:39:32 +00:00
Marcel Molina
9f92dd3984
Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 20:20:22 +00:00
Marcel Molina
6186490962
Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 18:10:14 +00:00
Jeremy Kemper
3a38c829e0
Closes #3784 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3562 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:47:13 +00:00
Jeremy Kemper
08bda903ec
Update AR default timezone docs.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3561 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:46:12 +00:00
David Heinemeier Hansson
c8b4cf65df
Speed up timestamping a tad #1227 [skaen]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-19 19:05:12 +00:00
David Heinemeier Hansson
4fbc3e30eb
Changed the auto-timestamping feature to use ActiveRecord::Base.default_timezone instead of entertaining the parallel ActiveRecord::Base.timestamps_gmt method. The latter is now deprecated and will throw a warning on use (but still work) #710 [Jamis Buck]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-24 12:00:42 +00:00
David Heinemeier Hansson
4eab375805
Finished polishing API docs
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-23 23:51:34 +00:00
David Heinemeier Hansson
981d86cbb9
Added ActiveRecord::Base.timestamps_gmt that can be set to true to make the automated timestamping use GMT instead of local time #520 [Scott Baron]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@491 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-24 13:18:29 +00:00
David Heinemeier Hansson
b09829354f
Fixed the automated timestamping feature when running under Rails' development environment that resets the inheritable attributes on each request.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-18 15:15:27 +00:00
David Heinemeier Hansson
f389a8fb5d
Updated and added more documentation
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@193 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 17:14:41 +00:00
David Heinemeier Hansson
c5d6aa2b18
Added option for turning off the automated timestamps
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 15:21:16 +00:00
David Heinemeier Hansson
d8a58eea11
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@177 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 03:01:11 +00:00