aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-12-29 15:39:50 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-12-29 17:53:04 -0500
commit4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce (patch)
tree1226535e69b77e2eadb2647fdddcba8b326d9f86 /activerecord/lib
parentfc3e67964753fb5166ccbd2030d7382e1976f393 (diff)
downloadrails-4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce.tar.gz
rails-4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce.tar.bz2
rails-4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce.zip
Remove deprecated support to passing arguments to `#select` when a block is provided.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 2dcb2f49cd..2d19395191 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -243,9 +243,7 @@ module ActiveRecord
def select(*fields)
if block_given?
if fields.any?
- ActiveSupport::Deprecation.warn(<<-WARNING.squish)
- When select is called with a block, it ignores other arguments. This behavior is now deprecated and will result in an ArgumentError in Rails 5.1. You can safely remove the arguments to resolve the deprecation warning because they do not have any effect on the output of the call to the select method with a block.
- WARNING
+ raise ArgumentError, "`select' with block doesn't take arguments."
end
return super()