Erb encoding problem

Hi guys,

I’m using Rails 3. I want to display generated html fragment inside
erb template

<%= “

Foo B.
” %>

Rails encodes div tags.

If I’m correct in Rails 2 <%=h cause encoding. Seems that it was
changed in Rails 3. How can insert html fragment without encoding in
Rails 3?

Regards,
Alexey.

On 26 August 2010 10:38, lexer [email protected] wrote:

changed in Rails 3. How can insert html fragment without encoding in
Rails 3?

Regards,
Alexey.

Is there any reason you cant use

Foo B.

I’m pretty sure that would work.

I’ve received an answer on stackoverflow:
http://stackoverflow.com/questions/3573851/erb-encoding-problem-in-rails-3

On Aug 26, 3:44 pm, Peter H. [email protected]
wrote:

I’m pretty sure that would work.

Regards,
Alexey.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs