aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/dirty.rb
Commit message (Collapse)AuthorAgeFilesLines
* expose a few attribute changed methodsAaron Patterson2013-06-111-10/+10
|
* Convert ActiveModel to 1.9 hash syntax.Patrick Robertson2013-05-011-1/+1
| | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
* Prefer find_by over dynamic finders in rdocSam Ruby2013-04-021-1/+1
|
* Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by"Guillermo Iguaran2013-01-181-1/+1
| | | | | This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1.
* User Rails 4 find_byrobertomiranda2013-01-181-1/+1
|
* Namespace HashWithIndifferentAccessAkira Matsuda2013-01-071-1/+1
|
* Reset attributes should not report changes.Renato Mascarenhas2012-12-011-1/+4
| | | | | | | | | | | When resetting an attribute, you expect it to return to the state it was before any changes. Namely, this fixes this unexpected behavior: ~~~ruby model.name = "Bob" model.reset_name! model.name_changed? #=> true ~~~
* cleanup, removed dispensable `require` statements from `ActiveModel`Yves Senn2012-11-251-1/+0
|
* minor edits in AM documentation [ci skip]Francesco Rodriguez2012-10-211-1/+1
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* update ActiveModel::Errors documentation and minor fixes [ci skip]Francesco Rodriguez2012-06-221-3/+3
|
* update ActiveModel::Dirty documentationFrancesco Rodriguez2012-05-311-24/+35
|
* updating define_attribute_methods documentationFrancesco Rodriguez2012-05-141-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-011-0/+1
|\
| * Add line which gives a little bit more information how *_will_change! works.Edward Tsech2012-05-011-0/+1
| |
* | Return earlier if attribute already changed in *_will_change! methodsCarlos Antonio da Silva2012-04-271-1/+3
|/ | | | Avoid obtaining the value and duplicating it when possible.
* Changing active model dirty module helper method to more appropriate method ↵Prasath Venkatraman2012-02-061-1/+2
| | | | | | | | with helper #4903 Changing active model dirty module helper method to more appropriate method with helper with Active Support Helper #4903 Changing active model dirty module helper method to more appropriate method with helper with Active Support Helper typo fixed #4903
* use any? instead of !empty?Oscar Del Ben2011-11-141-1/+1
|
* Fix typo in ActiveModel::Dirty comment. define_attribute_methods is a class ↵Josh Nesbitt2011-09-021-1/+1
| | | | method, not attribute.
* Documentation fix: adding missing equal sign in code sample for ↵Sebastian Gassner2011-07-201-1/+1
| | | | ActiveModel::Dirty.
* changing an attribute multiple times retains the correct original valueIan Stewart2011-06-281-1/+1
|
* Rephrased Dirty#changed? docsSebastian Martinez2011-04-261-1/+1
|
* RewordingOge Nnadi2011-04-111-1/+1
|
* Remove require AS::Concern from places where is already inSantiago Pastorino2010-12-191-1/+0
|
* Perf: refactor methods using inject when not need in activemodel.Emilio Tagua2010-09-221-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-18/+18
| | | | 's/[ \t]*$//' -i {} \;)
* Remove or fix non-working examples and add a few tests to Dirty [#5185 ↵Tore Darell2010-08-031-7/+2
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* expanding on the will_change! method in documentationNeeraj Singh2010-07-291-1/+4
|
* Changes call backs to callbacks.Rizwan Reza2010-06-151-1/+1
|
* Minor changes to active_model/callbacks.rb and dirty.rbRizwan Reza2010-06-141-6/+11
|
* a cloned object no longer mimics changed flags from creator , plus a test ↵Federico Brubacher2010-05-161-4/+5
| | | | | | case [#4614 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Restore changed_attributes method in ActiveModel::Dirty and loosen ↵Sam Pohlenz2010-04-011-12/+12
| | | | | | | | expectation on including class' initialize method. [#4308 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* adds a few requires in active_model/dirty.rbXavier Noria2010-03-281-0/+3
| | | | [#4284 state:committed]
* Fix unstated dep on HWIAJeremy Kemper2010-03-271-0/+2
|
* Fix tests added in previous commit.José Valim2010-03-271-0/+5
|
* ActiveModel::Dirty#changes should return a HashWithIndifferentAccess [#4157 ↵Jacob Atzen2010-03-271-1/+1
| | | | | | | | state:resolved] Keep the Rails style of inject Signed-off-by: José Valim <jose.valim@gmail.com>
* fisting uninitialized ivar warnings. [#4198 state:resolved]Aaron Patterson2010-03-161-10/+7
| | | | Signed-off-by: wycats <wycats@gmail.com>
* clean up more warnings, remove unnecessary methods, fix eval line numbers. ↵Aaron Patterson2010-03-161-9/+2
| | | | | | [#4193 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Merge docrailsPratik Naik2010-01-171-1/+39
|
* I added this feature so that a Map of changed fields could be retrievedJosh Sharpe2009-08-311-0/+14
| | | | | | | | | | | | | | | | | | | | after a model had been saved. This is useful in the after_save callback when you need to know what fields changed. At present there is no way to do this other than have code in the before_save callback that takes a copy of the changes Map, which I thought was a bit messy. Example. person = Person.find_by_name('bob') person.name = 'robert' person.changes # => {'name' => ['bob, 'robert']} person.save person.changes # => {} person.previous_changes # => {'name' => ['bob, 'robert']} person.reload person.previous_changes # => {} Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Extract common dirty tracking methods in AMoJoshua Peek2009-08-101-0/+112