aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/delegation.rb
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2017-03-12 17:00:04 +0000
committerGitHub <noreply@github.com>2017-03-12 17:00:04 +0000
commitfa9b4c4e43b83266876b0a86978be232fc74ec3a (patch)
tree05358cd5b3571c970966df63cd67b8677976b7dd /activerecord/lib/active_record/relation/delegation.rb
parent21a44916ae39cb622c11c3e206a74925d114cfa8 (diff)
parent4368dba5eea2fe5e06dabf26b62e20ccee274644 (diff)
downloadrails-fa9b4c4e43b83266876b0a86978be232fc74ec3a.tar.gz
rails-fa9b4c4e43b83266876b0a86978be232fc74ec3a.tar.bz2
rails-fa9b4c4e43b83266876b0a86978be232fc74ec3a.zip
Merge pull request #28372 from kamipo/delegate_as_json
Simply delegate `as_json` to `records`
Diffstat (limited to 'activerecord/lib/active_record/relation/delegation.rb')
-rw-r--r--activerecord/lib/active_record/relation/delegation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb
index d3ba724507..0612151584 100644
--- a/activerecord/lib/active_record/relation/delegation.rb
+++ b/activerecord/lib/active_record/relation/delegation.rb
@@ -38,7 +38,7 @@ module ActiveRecord
delegate :to_xml, :encode_with, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join,
:[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of,
- :to_sentence, :to_formatted_s,
+ :to_sentence, :to_formatted_s, :as_json,
:shuffle, :split, :index, to: :records
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,