Skip to content

Commit c5a26be

Browse files
Peter Frygregbell
authored andcommitted
Add tests for index parameters
1 parent 825973a commit c5a26be

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ end
2020

2121
group :development, :test do
2222
gem 'sqlite3-ruby', :require => 'sqlite3'
23-
2423
gem 'rake', '~> 0.9.2.2', :require => false
2524
gem 'haml', '~> 3.1.1', :require => false
2625
gem 'yard'

lib/active_admin/views/components/table_for.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def build(collection, options = {})
1212
@resource_class = options.delete(:i18n)
1313
@paginator = options.delete(:paginator)
1414
# Kaminari will call count(*) from <table_name> on non-paginated tables if we don't get rid of their scopes here
15-
@collection = @paginator ? collection : collection.except(:page, :per).limit(collection.except(:page, :per).per_page).offset(0)
15+
@collection = @paginator ? collection : collection.except(:page, :per).limit(collection.except(:page, :per).limit_value).offset(0)
1616
@columns = []
1717
build_table
1818
super(options)

0 commit comments

Comments
 (0)