diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-09-18 20:41:44 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-09-18 20:41:44 +0000 |
commit | 251a5d4508216d6c0927577333abb502d93e408d (patch) | |
tree | ae526b06370e48bfb48e5713a84668ab12ec1b1a /activerecord/lib | |
parent | b9c79f195fccd0a99c7915174a2932c469595bd0 (diff) | |
download | rails-251a5d4508216d6c0927577333abb502d93e408d.tar.gz rails-251a5d4508216d6c0927577333abb502d93e408d.tar.bz2 rails-251a5d4508216d6c0927577333abb502d93e408d.zip |
Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index bfa932c5b8..23ccb34cd2 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -782,14 +782,15 @@ module ActiveRecord def reflect_on_included_associations(associations) - [ associations ].flatten.collect { |association| reflect_on_association(association) } + [ associations ].flatten.collect { |association| reflect_on_association(association.to_s.intern) } end def guard_against_missing_reflections(reflections, options) reflections.each do |r| raise( ConfigurationError, - "Association was not found; perhaps you misspelled it? You specified :include => :#{options[:include].join(', :')}" + "Association was not found; perhaps you misspelled it? " + + "You specified :include => :#{[options[:include]].flatten.join(', :')}" ) if r.nil? end end |