My application layout has a login/logout link that displays depending on whether you are signed in or not:
<% if signed_in? %>
<%= link_to "Sign out", signout_path, :method => :delete %>
<% else %>
<%= link_to "Sign in", signin_path %>
<% end %>
This works fine, but seems really untidy and verbose. How can I output the appropriate link_to without so many <%…%> brackets?
Use HAML 😉