bh
bh copied to clipboard
Bootstrap Helpers for Ruby
Per https://getbootstrap.com/components/#alerts-dismissible, dismissible alert boxes should have an alert-dismissable css class.
If the key `:errors` exists in `@options` then the previous code will return `nil` if errors was nil. Changing it like this ensures we have a hash if errors did...
this way, one can manually create (and customize) the surrounding li container inside nav or dropdown and tell link_to not to create it
See https://github.com/Fullscreen/bh/issues/143
Sometime we just want to show modal immediately, for example when render js in AJAX jquery ujs way. ``` javascript $('#bs_alarm').html(''); $('#mbo_modal').modal(); ```
i.e., only for cases where string is constant - Also fixes a subtle bug involving safe_join([helper_object]), where helper_object.html_safe? may not be defined or may not return true but helper_object.to_s.html_safe? returns...
Solves this issue: https://github.com/Fullscreen/bh/issues/123
At the moment, the modal template adds the `fade` class to every modal, which is responsible for animating the opening/closing of a modal. If you want this animation gone, you...
`hash.fetch(:errors, {})` returns `nil` but expected to return `{}` for example in lib/bh/core_ext/rails/form/base_helper.rb:78
The problem here is: ``` { errors: nil }.fetch(:errors, {}) #==> nil ``` but the code expects: ``` ({ errors: nil }.fetch(:errors) || {}) #==> {} ``` for the chained...