Railsのlink_toでブロックごと囲む方法 - リア充爆発日記

ここでlink_toで検索して出てくるページのExampleに出てる http://api.rubyonrails.org/ <%= link_to(@profile) do %> <strong><%= @profile.name %></strong> -- <span>Check it out!</span> <% end %> # => <a href="/profiles/1"> <strong>David</strong> -- <span>Check it out!</span> </a> こういうこった!追記)続編:railsのlink_to_ifにブロックを渡すパーフェクト …