aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-11-21 11:20:56 +0100
committerYves Senn <yves.senn@gmail.com>2015-11-21 11:21:20 +0100
commit96cc2e8335ab3e4166e476415753125864d88196 (patch)
tree218e7184f60ed2d8ea39ecb91a9c7738b3a12fcf /activemodel
parent8fcdead070d1c54227ed9c2f2e25e7d38ca03119 (diff)
parentea0617e789f442426b8c30b5c72f76db0e29aef3 (diff)
downloadrails-96cc2e8335ab3e4166e476415753125864d88196.tar.gz
rails-96cc2e8335ab3e4166e476415753125864d88196.tar.bz2
rails-96cc2e8335ab3e4166e476415753125864d88196.zip
Merge pull request #22333 from harrykiselev/patch-3
[ci skip] Update dirty.rb: documentation fix.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/dirty.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb
index 0ab8df42f5..6e2e5afd1b 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)
+ # @name = name
+ # end
+ #
# def name
# @name
# end
@@ -54,7 +58,7 @@ module ActiveModel
#
# A newly instantiated +Person+ object is unchanged:
#
- # person = Person.new
+ # person = Person.new("Uncle Bob")
# person.changed? # => false
#
# Change the name: