diff options
Diffstat (limited to 'activemodel/lib/active_model/observing.rb')
-rw-r--r-- | activemodel/lib/active_model/observing.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb index 5f1c99ce62..26518c047b 100644 --- a/activemodel/lib/active_model/observing.rb +++ b/activemodel/lib/active_model/observing.rb @@ -49,7 +49,7 @@ module ActiveModel # end # # ORM.observers = :cacher, :garbage_collector - # ORM.observers # => [:cacher, :garbage_collector] + # ORM.observers # => [:cacher, :garbage_collector] # ORM.observers.class # => ActiveModel::ObserverArray def observers @observers ||= ObserverArray.new(self) @@ -328,8 +328,8 @@ module ActiveModel # Returns the class observed by default. It's inferred from the observer's # class name. # - # PersonObserver.observed_class # => Person - # AccountObserver.observed_class # => Account + # PersonObserver.observed_class # => Person + # AccountObserver.observed_class # => Account def observed_class name[/(.*)Observer/, 1].try :constantize end |