X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f6695c9079f4eeeecaa796c879868f797f97cd55..c985c2d4ce1e239b8154cf8583d74598ffcd3161:/lib/classic_pagination/pagination.rb?ds=inline 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])