Closed atomAltera closed 8 years ago
Hello, today I end up with strange issue in Rails 5:
Here is how a simple text.html.erb file looks like: <textarea><%= "a\nb\nc" %></textarea> And here is what it produce:
<textarea><%= "a\nb\nc" %></textarea>
I'm talking about these leading spaces before second and third strings.
In my code I have a form with textarea:
.form =form_for article do |f| .form-group =field_label f, :text, true =f.text_area :text, class: %w(form-control), rows: 20, placeholder: t('placeholder.article_text')
And the same issue happens there on Edit action
I found out that the reason is haml-rails gem in Gemfile. Without it <textarea><%= "a\nb\nc" %></textarea> forks fine, but with it, it adds extra spaces.
I strongly suspect that it's the Haml gem, and not this gem, which just contains some generators and has a dependency on Haml.
Ok, thank you. Fortunatly, in production it works fine
Hello, today I end up with strange issue in Rails 5:
Here is how a simple text.html.erb file looks like:
<textarea><%= "a\nb\nc" %></textarea>
And here is what it produce:I'm talking about these leading spaces before second and third strings.
In my code I have a form with textarea:
And the same issue happens there on Edit action
I found out that the reason is haml-rails gem in Gemfile. Without it
<textarea><%= "a\nb\nc" %></textarea>
forks fine, but with it, it adds extra spaces.