X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8e404f3a468a2636481d52f245b816c41e9d5ac0..67f365843186c4a2214b5d4bcfae47d59aa86309:/lib/classic_pagination/pagination.rb diff --git a/lib/classic_pagination/pagination.rb b/lib/classic_pagination/pagination.rb index 32995a5f6..ee0c5b7dc 100644 --- a/lib/classic_pagination/pagination.rb +++ b/lib/classic_pagination/pagination.rb @@ -98,7 +98,7 @@ module ActionController unknown_option_keys.empty? options[:singular_name] ||= ActiveSupport::Inflector.singularize(collection_id.to_s) - options[:class_name] ||= ActiveSupport::Inflector.camelize(options[:singular_name]) + options[:class_name] ||= ActiveSupport::Inflector.camelize(options[:singular_name]) end # Returns a paginator and a collection of Active Record model instances @@ -155,8 +155,7 @@ module ActionController def create_paginators_and_retrieve_collections #:nodoc: Pagination::OPTIONS[self.class].each do |collection_id, options| - next unless options[:actions].include? action_name if - options[:actions] + next if options[:actions] && !options[:actions].include?(action_name) paginator, collection = paginator_and_collection_for(collection_id, options)