I’m not sure why “\n\n” is not adding two line breaks in my code below:
<%= (getparagraph(@geography, "geography")+"\n\n") if @geography != "Other" %>
To clarify the method getparagraphs simply returns a paragraph of text. I’m trying to add two line breaks within the Ruby code without having to use <br/>
Any ideas? Everything I’ve read implies that it should work.
Your helper has “paragraph” in its name so maybe you should wrap it in a paragraph and use CSS to add the appropriate spacing around the paragraph:
You could always add a special class to the
<p>if you need an extra spacing after this:and then in your CSS:
And if this is to appear inside another
<p>then you’d need to re-arrange the HTML a bit as you can’t put a block element inside a<p>: