Skip to content

Commit

Permalink
Remove extra white spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinez87 committed May 19, 2011
1 parent 0afd585 commit b91c907
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions activerecord/lib/active_record/associations.rb
Expand Up @@ -33,7 +33,7 @@ def initialize(owner_class_name, reflection)


class HasManyThroughAssociationPointlessSourceTypeError < ActiveRecordError #:nodoc: class HasManyThroughAssociationPointlessSourceTypeError < ActiveRecordError #:nodoc:
def initialize(owner_class_name, reflection, source_reflection) def initialize(owner_class_name, reflection, source_reflection)
super("Cannot have a has_many :through association '#{owner_class_name}##{reflection.name}' with a :source_type option if the '#{reflection.through_reflection.class_name}##{source_reflection.name}' is not polymorphic. Try removing :source_type on your association.") super("Cannot have a has_many :through association '#{owner_class_name}##{reflection.name}' with a :source_type option if the '#{reflection.through_reflection.class_name}##{source_reflection.name}' is not polymorphic. Try removing :source_type on your association.")
end end
end end


Expand All @@ -48,7 +48,7 @@ def initialize(reflection)
through_reflection = reflection.through_reflection through_reflection = reflection.through_reflection
source_reflection_names = reflection.source_reflection_names source_reflection_names = reflection.source_reflection_names
source_associations = reflection.through_reflection.klass.reflect_on_all_associations.collect { |a| a.name.inspect } source_associations = reflection.through_reflection.klass.reflect_on_all_associations.collect { |a| a.name.inspect }
super("Could not find the source association(s) #{source_reflection_names.collect{ |a| a.inspect }.to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)} in model #{through_reflection.klass}. Try 'has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}, :source => <name>'. Is it one of #{source_associations.to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)}?") super("Could not find the source association(s) #{source_reflection_names.collect{ |a| a.inspect }.to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)} in model #{through_reflection.klass}. Try 'has_many #{reflection.name.inspect}, :through => #{through_reflection.name.inspect}, :source => <name>'. Is it one of #{source_associations.to_sentence(:two_words_connector => ' or ', :last_word_connector => ', or ', :locale => :en)}?")
end end
end end


Expand Down Expand Up @@ -96,7 +96,7 @@ def initialize(reflection)


class ReadOnlyAssociation < ActiveRecordError #:nodoc: class ReadOnlyAssociation < ActiveRecordError #:nodoc:
def initialize(reflection) def initialize(reflection)
super("Can not add to a has_many :through association. Try adding to #{reflection.through_reflection.name.inspect}.") super("Can not add to a has_many :through association. Try adding to #{reflection.through_reflection.name.inspect}.")
end end
end end


Expand Down

0 comments on commit b91c907

Please sign in to comment.