lib/draper/decoratable.rb in draper-2.1.0 vs lib/draper/decoratable.rb in draper-3.0.0.pre1
- old
+ new
@@ -54,11 +54,10 @@
# @example
# Product.popular.decorate
# @param [Hash] options
# see {Decorator.decorate_collection}.
def decorate(options = {})
- collection = Rails::VERSION::MAJOR >= 4 ? all : scoped
- decorator_class.decorate_collection(collection, options.reverse_merge(with: nil))
+ decorator_class.decorate_collection(all, options.reverse_merge(with: nil))
end
def decorator_class?
decorator_class
rescue Draper::UninferrableDecoratorError