formtastic-bootstrap
formtastic-bootstrap copied to clipboard
Problems with `html_safe` in Rails 5
I recently updated my application to Rails 5.0.6 and was rerunning the test suite when formtastic-bootstrap threw an error relating to the html_safe
command.
Failure/Error: <%= ep.input :media_link, input_html: { onBlur: 'onYouTubeIframeAPIReady()' }, label: t('activerecord.attributes.engagement_player.media_link') %>
ActionView::Template::Error:
undefined method `html_safe' for Formtastic::Util:Module
Did you mean? html_safe?
I dived into the code for this gem and line 14 (the line that the full error report says is the issue; see pastebin link below) doesn't even have html_safe
on it, so I'm not sure where the error message is coming from. Anyone have any insight into this issue or have experienced anything similar?
lib/formtastic-bootstrap/inputs/base/wrapping.rb
----------------
08 | def bootstrap_wrapping(&block)
09 | form_group_wrapping do
10 | label_html <<
11 | template.content_tag(:span, :class => 'form-wrapper') do
12 | input_content(&block) <<
13 | hint_html(:block) <<
14 | error_html(:block) # Problem line
15 | end
16 | end
17 | end
Here's a Pastebin of the entirety of the error message generated: https://pastebin.com/LyLXcUcx
Thanks, Tresky
EDIT: Formatting
Still an issue on Rails 6.0.0.rc1