From ea0617e789f442426b8c30b5c72f76db0e29aef3 Mon Sep 17 00:00:00 2001 From: "Harry V. Kiselev" Date: Thu, 19 Nov 2015 00:45:54 +0300 Subject: [PATCH] Update dirty.rb: documentation fix. ActiveModel::Dirty module documentation fix. --- activemodel/lib/active_model/dirty.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: