heartcombo/show_for

CSS Class Name collision

maduhaime opened this issue · 2 comments

Dear friend,
I'm using show_for with Bootstrap in a Rails app. Bootstrap reserve a lot of css class name to perform styling. In my particular case, I'm managing leads in a user interface. The singular form ( lead ) is reserved by Bootstrap to generate "Lead body copy".

Since show_for automatically add the lead class to the wrapper, this produce a strange result. The problem is the #{dom_class(object)} part of the following code.

private

def show_for_html_class(object, html_options)
  "show_for #{dom_class(object)} #{html_options[:class]} #{ShowFor.show_for_class}".squeeze(" ").rstrip
end

Can you modify the code and add this as a config in the initializer?

Pull request is always welcome

I'm closing this a stale, please let us know if you're still having this issue and we can discuss/reopen. Thanks!