]> git.openstreetmap.org Git - rails.git/blobdiff - lib/classic_pagination/pagination.rb
Fix warnings from rubocop update
[rails.git] / lib / classic_pagination / pagination.rb
index 990a53d8b1d55be2b7561782854f510898d86e80..b48844000135381a83960bddc68dc0d0cd905763 100644 (file)
@@ -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
@@ -359,13 +359,13 @@ module ActionController
         # Returns a new Page object representing the page just before this
         # page, or nil if this is the first page.
         def previous
-          if first? then nil else @paginator[@number - 1] end
+          first? ? nil : @paginator[@number - 1]
         end
 
         # Returns a new Page object representing the page just after this
         # page, or nil if this is the last page.
         def next
-          if last? then nil else @paginator[@number + 1] end
+          last? ? nil : @paginator[@number + 1]
         end
 
         # Returns a new Window object for this page with the specified