Подтвердить что ты не робот

Link_to с дополнительным html в теге привязки

Как добавить дополнительный контент к ссылке при использовании link_to helper в Rails?

link_to "Stephen Weber", "index.html"

создает следующее:

<a href="index.html">Stephen Weber</a>

Но что, если я хочу создать это?

<a href="index.html">
    <h3>Stephen Weber</h3>
    <p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
    <p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
    <p class="ui-li-aside"><strong>6:24</strong>PM</p>
</a>

Я играю с jQuery Mobile, и это то, что требуется для форматирования контента в списках.

4b9b3361

Ответ 1

Вы могли бы сделать:

 <%= link_to 'index.html', :title => "Some link" do %>
     <h3> Stephen Weber </h3>
     ...
 <% end %>