In RoR, is there an easy way to prevent the view from outputting <p> tags?
- by dt
I'm new to Ruby and Rails and I have a simple controller that shows an item from the database in a default view. When it is displaying in HTML it is outputting <p> tags along with the text content. Is there a way to prevent this from happening? I suppose if there isn't, is there at least a way to set the default css class for the same output in a statement such as this:
<% @Items.each do |i| %>
<%= i.itemname %>
<div class="menu_body">
<a href="#">Link-1</a>
</div>
<% end %>
So the problem is with the <%= i.itemname %> part. Is there a way to stop it from wrapping it in its own <p> tags? Or set the css class for the output?
Thanks!