lib/active_admin/views/components/paginated_collection.rb in activeadmin-2.8.0 vs lib/active_admin/views/components/paginated_collection.rb in activeadmin-2.8.1

- old
+ new

@@ -1,7 +1,7 @@ -require 'active_admin/helpers/collection' -require 'active_admin/view_helpers/download_format_links_helper' +require "active_admin/helpers/collection" +require "active_admin/view_helpers/download_format_links_helper" module ActiveAdmin module Views # Wraps the content with pagination and available formats. @@ -90,11 +90,11 @@ end end end def build_pagination - options = { theme: @display_total ? 'active_admin' : 'active_admin_countless' } + options = { theme: @display_total ? "active_admin" : "active_admin_countless" } options[:params] = @params if @params options[:param_name] = @param_name if @param_name if !@display_total # The #paginate method in kaminari will query the resource with a @@ -117,15 +117,15 @@ def page_entries_info(options = {}) if options[:entry_name] entry_name = options[:entry_name] entries_name = options[:entries_name] || entry_name.pluralize elsif collection_is_empty? - entry_name = I18n.t "active_admin.pagination.entry", count: 1, default: 'entry' - entries_name = I18n.t "active_admin.pagination.entry", count: 2, default: 'entries' + entry_name = I18n.t "active_admin.pagination.entry", count: 1, default: "entry" + entries_name = I18n.t "active_admin.pagination.entry", count: 2, default: "entries" else key = "activerecord.models." + collection.first.class.model_name.i18n_key.to_s - entry_name = I18n.translate key, count: 1, default: collection.first.class.name.underscore.sub('_', ' ') + entry_name = I18n.translate key, count: 1, default: collection.first.class.name.underscore.sub("_", " ") entries_name = I18n.translate key, count: collection.size, default: entry_name.pluralize end if @display_total if collection.total_pages < 2