X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d82f9d12ce55a0287361ed4f93cd97e896778a35..a0627ec0c651cf33426438e26e4a4a2fe3a34fd5:/lib/classic_pagination/pagination.rb diff --git a/lib/classic_pagination/pagination.rb b/lib/classic_pagination/pagination.rb index 36653ee02..f12ff095f 100644 --- a/lib/classic_pagination/pagination.rb +++ b/lib/classic_pagination/pagination.rb @@ -93,9 +93,10 @@ module ActionController valid_options << :actions unless in_action unknown_option_keys = options.keys - valid_options - raise ActionController::ActionControllerError, - "Unknown options: #{unknown_option_keys.join(', ')}" unless - unknown_option_keys.empty? + unless unknown_option_keys.empty? + raise ActionController::ActionControllerError, + "Unknown options: #{unknown_option_keys.join(', ')}" + end options[:singular_name] ||= ActiveSupport::Inflector.singularize(collection_id.to_s) options[:class_name] ||= ActiveSupport::Inflector.camelize(options[:singular_name])