Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with kaminari theme #2283

Closed
benjaminwood opened this issue Apr 30, 2015 · 6 comments
Closed

Problem with kaminari theme #2283

benjaminwood opened this issue Apr 30, 2015 · 6 comments

Comments

@benjaminwood
Copy link
Contributor

I ran into an interesting problem today which is that I'm working on a project which uses both rails_admin & this gem: https://github.com/matenia/bootstrap-kaminari-views

The problem is that both have kaminari themes at this path: views/kaminari/twitter-bootstrap. So, when I'm using Kaminari in some non rails_admin view and specify the theme like this:

= paginate @resource, remote: true, :theme => 'twitter-bootstrap'

I end up with rails_admin kaminari theme instead of the other gem referenced above. The main issue with this is in regards to the remote: true option. When this option is passed, rails_admin adds a 'pjax' class and does not specify data-remote=true (standard rails/what I need).

My temp solution was to simply copy the bootstrap-kaminari-views theme into my app /views directory and title it something else.

Possible solution: change rails_admin kaminari theme name to something more specific like 'rails-admin-twitter-bootstrap'.

@halilim
Copy link

halilim commented Jun 10, 2015

Putting gem 'bootstrap-kaminari-views' after gem 'rails_admin' has an even more interesting effect: it removes styling from rails_admin pagination (I'm using theme: 'twitter-bootstrap-3' on the front, so no problem for me there).

@klyonrad
Copy link
Contributor

klyonrad commented Jun 7, 2016

So which gem is to blame here - who has to fix this?
@halilim Thank you so fucking much for your information with the load order.

@benjaminwood
Copy link
Contributor Author

benjaminwood commented Jun 7, 2016

I wouldn't say that either gem is to blame. It's simply a conflict between the two and technically either gem could fix it. Though, as I mentioned above I think it makes most sense that rails_admin changes the name of their theme, since the name of the other gem is bootstrap-kaminari-views. IE: I'm not sure what they would change it to.

If the maintainer(s) of rails_admin agree, perhaps one of us can submit a PR.

@bbenezech
Copy link
Collaborator

@benjaminwood Sure, namespacing bootstrap-kaminari-views to ra-bootstrap-kaminari-views would make sense, no pb.

@benjaminwood
Copy link
Contributor Author

Cool, PR submitted ☝️

@bbenezech
Copy link
Collaborator

merged!

rikkipitt added a commit to jemcode/rails_admin_history_rollback that referenced this issue Sep 22, 2016
This is due to a change in RailsAdmin described here
railsadminteam/rails_admin#2283

Fixes #14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants