diff options
Diffstat (limited to 'activerecord/lib/active_record/null_relation.rb')
-rw-r--r-- | activerecord/lib/active_record/null_relation.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/null_relation.rb b/activerecord/lib/active_record/null_relation.rb index 711fc8b883..080b20134d 100644 --- a/activerecord/lib/active_record/null_relation.rb +++ b/activerecord/lib/active_record/null_relation.rb @@ -6,7 +6,7 @@ module ActiveRecord @records = [] end - def pluck(_column_name) + def pluck(*column_names) [] end @@ -39,11 +39,7 @@ module ActiveRecord end def to_sql - @to_sql ||= "" - end - - def where_values_hash - {} + "" end def count(*) @@ -54,8 +50,12 @@ module ActiveRecord 0 end - def calculate(_operation, _column_name, _options = {}) - nil + def calculate(_operation, _column_name) + if _operation == :count + 0 + else + nil + end end def exists?(_id = false) |