]> git.openstreetmap.org Git - rails.git/blobdiff - lib/classic_pagination/pagination.rb
Preserve URL fragments through external authentication
[rails.git] / lib / classic_pagination / pagination.rb
index 32995a5f65fa28c290833cf0a2b356e8e6a229c2..ee0c5b7dce015d99e43e634040be9eccb4eca064 100644 (file)
@@ -98,7 +98,7 @@ module ActionController
               unknown_option_keys.empty?
 
       options[:singular_name] ||= ActiveSupport::Inflector.singularize(collection_id.to_s)
               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
     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|
 
     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)
 
         paginator, collection =
           paginator_and_collection_for(collection_id, options)