diff options
author | Abdelkader Boudih <terminale@gmail.com> | 2015-02-03 07:40:03 +0000 |
---|---|---|
committer | Abdelkader Boudih <terminale@gmail.com> | 2015-02-03 07:40:03 +0000 |
commit | 054e2a3d4220fcdf91170b5b45f16da36e35c5ce (patch) | |
tree | d569f6d750b1184d384105488fa13ef78be523a0 /activemodel | |
parent | 186418724c6da41caeb0fd304894bcfcc154b8bb (diff) | |
parent | fc87123fe85037a0071c5f4d43135fd604452b95 (diff) | |
download | rails-054e2a3d4220fcdf91170b5b45f16da36e35c5ce.tar.gz rails-054e2a3d4220fcdf91170b5b45f16da36e35c5ce.tar.bz2 rails-054e2a3d4220fcdf91170b5b45f16da36e35c5ce.zip |
Merge pull request #18794 from vipulnsward/fix-dirty
Fix AM#Dirty introduction example
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index 614bc6a5d8..f5147d466e 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -26,6 +26,10 @@ module ActiveModel # # define_attribute_methods :name # + # def initialize name = nil + # @name = name + # end + # # def name # @name # end @@ -54,7 +58,7 @@ module ActiveModel # # A newly instantiated object is unchanged: # - # person = Person.find_by(name: 'Uncle Bob') + # person = Person.new 'Uncle Bob' # person.changed? # => false # # Change the name: |