In Rails, you can create an anchor tag that spans multiple lines doing something like the following:
<% link_to target_url_path do %>
<span class="title">Example</span>
<span class="excerpt">Neque porro quisquam est qui dolorem ipsum...</span>
<%= image_tag 'example.png', :class => 'thumbnail' %>
<% end >
I'm wondering how I can set a value using a similar approach. In essence, something like:
<% my_variable = do %>
<span class="title">Example</span>
<span class="excerpt">Neque porro quisquam est qui dolorem ipsum...</span>
<%= image_tag 'example.png', :class => 'thumbnail' %>
<% end >
Edit: in case anyone is curious why I'm asking, it's because facebox_link_to
doesn't appear to allow you to use the do
syntax like link_to
does.