lib/groupdate/series.rb in groupdate-2.4.0 vs lib/groupdate/series.rb in groupdate-2.5.0

- old
+ new

@@ -10,18 +10,17 @@ # clone to prevent modifying original variables def method_missing(method, *args, &block) # https://github.com/rails/rails/blob/master/activerecord/lib/active_record/relation/calculations.rb if ActiveRecord::Calculations.method_defined?(method) magic.perform(relation, method, *args, &block) - elsif @relation.respond_to?(method) + elsif @relation.respond_to?(method, true) Groupdate::Series.new(magic, relation.send(method, *args, &block)) else super end end def respond_to?(method, include_all = false) ActiveRecord::Calculations.method_defined?(method) || relation.respond_to?(method) || super end - end end