<% if user_signed_in? %>
<li><%= link_to('Logout', destroy_user_session_path, :method => :delete) %> </li>
<li><%= link_to('Edit registration', edit_user_registration_path) %> </li>
<li><%= link_to 'Add Post', :controller=>'/posts', :action=>'new' %></li>
<% else %>
<li><%= link_to('Login', new_user_session_path) %></li>
<% end %>
Is it possible to write these line of code inside one block ?
Can anyone post a shortcut way? Too much <% %> , <% end %>
What’s wrong with doing it like this?