diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-06 13:05:58 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-06 13:05:58 -0700 |
commit | c713cf9a5d9db60c4387e74acb9de66e3e7f9b37 (patch) | |
tree | 07711a61950bb3c789261fb945feb60fe13a0896 /activerecord/lib/active_record/relation | |
parent | d10d93225c6d9d4948400c22df4169075758ff8c (diff) | |
parent | f2a0dfc2985c008a618e1616f6cf9a4c54098c33 (diff) | |
download | rails-c713cf9a5d9db60c4387e74acb9de66e3e7f9b37.tar.gz rails-c713cf9a5d9db60c4387e74acb9de66e3e7f9b37.tar.bz2 rails-c713cf9a5d9db60c4387e74acb9de66e3e7f9b37.zip |
Merge pull request #1273 from jeremyf/feature-association-proxy-send
Addresses an inconsistency in the ActiveRecord::Base.method_missing handl
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index c6e8762b4a..422d89060b 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -259,6 +259,7 @@ module ActiveRecord if match.bang? && result.blank? raise RecordNotFound, "Couldn't find #{@klass.name} with #{conditions.to_a.collect {|p| p.join(' = ')}.join(', ')}" else + yield(result) if block_given? result end end |