kaminari bootstrap

This commit is contained in:
Adrian Hinz 2019-05-15 17:04:04 +02:00
parent 0ebd341780
commit 2bf1a0f263
4 changed files with 7 additions and 1 deletions

View File

@ -32,6 +32,7 @@ gem 'redis', '~> 4.0'
# Use ActiveStorage variant # Use ActiveStorage variant
gem 'mini_magick', '~> 4.8' gem 'mini_magick', '~> 4.8'
gem 'kaminari', '~> 1.1.1' gem 'kaminari', '~> 1.1.1'
gem 'bootstrap4-kaminari-views'
# Use Capistrano for deployment # Use Capistrano for deployment
# gem 'capistrano-rails', group: :development # gem 'capistrano-rails', group: :development

View File

@ -51,6 +51,9 @@ GEM
bindex (0.7.0) bindex (0.7.0)
bootsnap (1.4.3) bootsnap (1.4.3)
msgpack (~> 1.0) msgpack (~> 1.0)
bootstrap4-kaminari-views (1.0.1)
kaminari (>= 0.13)
rails (>= 3.1)
builder (3.2.3) builder (3.2.3)
byebug (11.0.1) byebug (11.0.1)
capybara (3.16.2) capybara (3.16.2)
@ -223,6 +226,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bootsnap (>= 1.1.0) bootsnap (>= 1.1.0)
bootstrap4-kaminari-views
byebug byebug
capybara (>= 2.15) capybara (>= 2.15)
chromedriver-helper chromedriver-helper

View File

@ -78,7 +78,7 @@ module Admin
end end
def collection def collection
@courses = Course.name_asc @courses = Course.name_asc.page(params[:page])
end end
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.

View File

@ -22,4 +22,5 @@
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
<%= paginate @courses, theme: 'twitter-bootstrap-4', pagination_class: 'justify-content-center' %>
<% end %> <% end %>