aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2008-12-27 14:16:17 +0000
committerYehuda Katz <wycats@gmail.com>2009-01-01 00:13:10 -0800
commit373e94a03f1b5d3a2f0551d95c64ebbaf416d47f (patch)
tree0a09f3007ab6b7905a28407d91bcc906537c3ea6
parent7276128fb47d5997437eb5452b4e9a82ee54f4a8 (diff)
downloadrails-373e94a03f1b5d3a2f0551d95c64ebbaf416d47f.tar.gz
rails-373e94a03f1b5d3a2f0551d95c64ebbaf416d47f.tar.bz2
rails-373e94a03f1b5d3a2f0551d95c64ebbaf416d47f.zip
Fix to_sentence being used with options removed by 273c77
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index dfa3ffab4b..86616abf52 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -22,7 +22,7 @@ module ActiveRecord
through_reflection = reflection.through_reflection
source_reflection_names = reflection.source_reflection_names
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(&:inspect).to_sentence :connector => 'or'} 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 :connector => 'or'}?")
+ super("Could not find the source association(s) #{source_reflection_names.collect(&:inspect).to_sentence :two_words_connector => ' or ', :last_word_connector => ', or '} 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 '}?")
end
end