diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-11-25 12:33:47 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2012-11-25 16:57:29 +0100 |
commit | b7edbc718b2d1c6cc02b337283633ea4c05795ca (patch) | |
tree | 002dce6649b287d9c1d4d4a237d40cc27c58c01e /activemodel | |
parent | e95b9d6c68b1e0bba3840d18fc0aa94ccf88776d (diff) | |
download | rails-b7edbc718b2d1c6cc02b337283633ea4c05795ca.tar.gz rails-b7edbc718b2d1c6cc02b337283633ea4c05795ca.tar.bz2 rails-b7edbc718b2d1c6cc02b337283633ea4c05795ca.zip |
cleanup, remove broken whitespace
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/attribute_methods.rb | 4 | ||||
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 4 | ||||
-rw-r--r-- | activemodel/lib/active_model/observing.rb | 6 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations/callbacks.rb | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 86eaad830e..af11da1351 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -8,7 +8,7 @@ module ActiveModel # # user = User.first # user.pets.select(:id).first.user_id - # # => ActiveModel::MissingAttributeError: missing attribute: user_id + # # => ActiveModel::MissingAttributeError: missing attribute: user_id class MissingAttributeError < NoMethodError end # == Active \Model Attribute Methods @@ -202,7 +202,7 @@ module ActiveModel # person.name # => "Bob" # person.nickname # => "Bob" # person.name_short? # => true - # person.nickname_short? # => true + # person.nickname_short? # => true def alias_attribute(new_name, old_name) self.attribute_aliases = attribute_aliases.merge(new_name.to_s => old_name.to_s) attribute_method_matchers.each do |matcher| diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index 264880eecd..b9297db108 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -56,8 +56,8 @@ module ActiveModel # end # # BlogPost.model_name <=> 'BlogPost' # => 0 - # BlogPost.model_name <=> 'Blog' # => 1 - # BlogPost.model_name <=> 'BlogPosts' # => -1 + # BlogPost.model_name <=> 'Blog' # => 1 + # BlogPost.model_name <=> 'BlogPosts' # => -1 ## # :method: =~ 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 diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb index a8fb4fdfc2..5cb6abaf9f 100644 --- a/activemodel/lib/active_model/validations/callbacks.rb +++ b/activemodel/lib/active_model/validations/callbacks.rb @@ -85,8 +85,8 @@ module ActiveModel # person = Person.new # person.name = '' # person.valid? # => false - # person.status # => false - # person.name = 'bob' + # person.status # => false + # person.name = 'bob' # person.valid? # => true # person.status # => true def after_validation(*args, &block) |