This is an effect of using the simple_format method:
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-simple_format

"Returns text transformed into HTML
<http://api.rubyonrails.org/classes/HTML.html> using simple formatting
rules. Two or more consecutive newlines(\n\n) are considered as a paragraph
and wrapped in <p> tags. One newline (\n) is considered as a linebreak and
a <br /> tag is appended. This method does not remove the newlines from the
text.

You can pass any HTML <http://api.rubyonrails.org/classes/HTML.html> attributes
into html_options. These will be added to all created paragraphs."


If you just want to print out the bare text, you can just put that in your
erb tag: <%= my_variable %>


On Mon, Jul 7, 2014 at 10:31 AM, Ronald Fischer <[email protected]>
wrote:

> I have in my erb file something like this:
>
> <%= simple_format(...) %>
>
> The generated code is wrapped within <p></p>. In my case, I need the
> code be interpolated without this wrapping. Can this be done?
>
> Ronald
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/d57a3149f8a9e5c413b84db959c5e6f4%40ruby-forum.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAAb4X%3DzQK5Mz%2BQW_iYZdTUGw_Ns3n0HXxEME%2Bx-UTh6bfjaDcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to