diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-20 20:44:02 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-20 20:44:02 -0200 |
commit | bc625080308e4853ae3036f2ad74fe3826e463ef (patch) | |
tree | 5c6b3f1d480c2d5aa2600dd144b932c950394a11 /activerecord/lib/active_record/querying.rb | |
parent | 5a09f13a34426a02a305a12dfc90ced9bdd6c46e (diff) | |
parent | cafe31a078276dbf941bd8b30f0caddc878c0830 (diff) | |
download | rails-bc625080308e4853ae3036f2ad74fe3826e463ef.tar.gz rails-bc625080308e4853ae3036f2ad74fe3826e463ef.tar.bz2 rails-bc625080308e4853ae3036f2ad74fe3826e463ef.zip |
Merge pull request #13757 from terracatta/master
Ensure #second (and others) acts like #first AR finder
Diffstat (limited to 'activerecord/lib/active_record/querying.rb')
-rw-r--r-- | activerecord/lib/active_record/querying.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/querying.rb b/activerecord/lib/active_record/querying.rb index fd4c973504..ef138c6f80 100644 --- a/activerecord/lib/active_record/querying.rb +++ b/activerecord/lib/active_record/querying.rb @@ -1,6 +1,7 @@ module ActiveRecord module Querying delegate :find, :take, :take!, :first, :first!, :last, :last!, :exists?, :any?, :many?, to: :all + delegate :second, :second!, :third, :third!, :fourth, :fourth!, :fifth, :fifth!, :forty_two, :forty_two!, to: :all delegate :first_or_create, :first_or_create!, :first_or_initialize, to: :all delegate :find_or_create_by, :find_or_create_by!, :find_or_initialize_by, to: :all delegate :find_by, :find_by!, to: :all |