Class: Bently::Kaminari
- Inherits:
-
RailsRecipe
- Object
- Recipe
- RubyRecipe
- RailsRecipe
- Bently::Kaminari
- Defined in:
- lib/bently/recipe/kaminari.rb
Constant Summary
Constants inherited from RubyRecipe
Instance Method Summary collapse
-
#initialize ⇒ Kaminari
constructor
A new instance of Kaminari.
Methods inherited from RailsRecipe
Methods inherited from RubyRecipe
Methods inherited from Recipe
#append, breakdown, category, #code, #create, description, homepage, #insert, #modify, #operate, #operations, #prepend, #remove, #requirement, #run, #say, title, #todo, #usage, version, #warn
Constructor Details
#initialize ⇒ Kaminari
Returns a new instance of Kaminari.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bently/recipe/kaminari.rb', line 7 def initialize gem 'kaminari' bundle generate 'active_admin:install' migrate usage 'The page scope. To fetch the 7th page of users (default per_page is 25):' say ' User.page(7)', '1', :magenta usage 'To show a lot more users per each page (change the per_page value)' say ' User.page(7).per(50)', '1', :magenta usage 'Occasionally you need to pad a number of records that is not a multiple of the page size.' say ' User.page(7).per(50).padding(3)', '1', :magenta end |