Commit 2dd122c6c891db4b1abb5e43cf1ba120893fe735

Authored by Andrew Kane
1 parent e2bc9b5a

Fixes for Rails 5.0.0.beta1

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/groupdate/enumerable.rb
@@ -4,7 +4,7 @@ module Enumerable @@ -4,7 +4,7 @@ module Enumerable
4 if block 4 if block
5 Groupdate::Magic.new(period, options).group_by(self, &block) 5 Groupdate::Magic.new(period, options).group_by(self, &block)
6 elsif respond_to?(:scoping) 6 elsif respond_to?(:scoping)
7 - scoping { @klass.send(:"group_by_#{field}", *args, &block) } 7 + scoping { @klass.send(:"group_by_#{period}", options, *args, &block) }
8 else 8 else
9 raise ArgumentError, "no block given" 9 raise ArgumentError, "no block given"
10 end 10 end