Skip to content
This repository has been archived by the owner on Oct 12, 2019. It is now read-only.

Problems with html_safe in Rails 5 #141

Open
Tresky opened this issue Jan 9, 2018 · 1 comment
Open

Problems with html_safe in Rails 5 #141

Tresky opened this issue Jan 9, 2018 · 1 comment

Comments

@Tresky
Copy link

Tresky commented Jan 9, 2018

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

@Genkilabs
Copy link

Still an issue on Rails 6.0.0.rc1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants