Skip to content

Commit

Permalink
Warn when params are passed to helpers explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
5t111111 committed Aug 21, 2017
1 parent 3465744 commit 900f967
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kaminari-core/lib/kaminari/helpers/tags.rb
Expand Up @@ -27,6 +27,7 @@ def initialize(template, params: {}, param_name: nil, theme: nil, views_prefix:
# params in Rails 5 may not be a Hash either,
# so it must be converted to a Hash to be merged into @params
unless params.empty?
ActiveSupport::Deprecation.warn 'Explicitly passing params to helpers could be removed in the future.'
params = params.to_unsafe_h if params.respond_to?(:to_unsafe_h)
params = params.with_indifferent_access
@params.merge! params
Expand Down

0 comments on commit 900f967

Please sign in to comment.