aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorHarry V. Kiselev <harry.kiselev@gmail.com>2015-11-19 00:45:54 +0300
committerHarry V. Kiselev <harry.kiselev@gmail.com>2015-11-19 00:45:54 +0300
commitea0617e789f442426b8c30b5c72f76db0e29aef3 (patch)
tree5b4138b010b60d9ea6568e26e2cd1a3e4776738e /activemodel
parent3d8a7c0e64fef726c22fd64911771cee8c467447 (diff)
downloadrails-ea0617e789f442426b8c30b5c72f76db0e29aef3.tar.gz
rails-ea0617e789f442426b8c30b5c72f76db0e29aef3.tar.bz2
rails-ea0617e789f442426b8c30b5c72f76db0e29aef3.zip
Update dirty.rb: documentation fix.
ActiveModel::Dirty module 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..80e2814b00 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(name: "Uncle Bob")
# person.changed? # => false
#
# Change the name: