... | @@ -38,9 +38,24 @@ filter :country_in, as: :select, collection: Country::ALL |
... | @@ -38,9 +38,24 @@ filter :country_in, as: :select, collection: Country::ALL |
|
|
|
|
|
[Source](https://git.altum.com.br/gocase/gocase-factory/blob/develop/app/ui/go_logistics/order/index.rb)
|
|
[Source](https://git.altum.com.br/gocase/gocase-factory/blob/develop/app/ui/go_logistics/order/index.rb)
|
|
|
|
|
|
## References
|
|
### References
|
|
|
|
|
|
[ActiveAdmin Filters with Ransack](https://cavewall.jaguardesignstudio.com/2014/05/01/activeadmin-filters-with-ransack/)
|
|
[ActiveAdmin Filters with Ransack](https://cavewall.jaguardesignstudio.com/2014/05/01/activeadmin-filters-with-ransack/)
|
|
|
|
|
|
|
|
## Add pagination select box on resource's index page
|
|
|
|
|
|
|
|
You can do it globally by setting the following line in the activeadmin initializer (config/initializers/active_admin.rb).
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
config.default_per_page = [20, 50, 100, 200, 500]
|
|
|
|
```
|
|
|
|
|
|
|
|
Or per resource by registering in the resource the following:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
ActiveAdmin.register MyModel do
|
|
|
|
config.per_page = [20, 50, 100, 200]
|
|
|
|
end
|
|
|
|
```
|
|
|
|
|
|
|
|
The numbers in the arrays are the options for the __per_page__ params. |
|
|
|
\ No newline at end of file |