Skip to content

Commit

Permalink
refactor links #110
Browse files Browse the repository at this point in the history
  • Loading branch information
zr2d2 committed Jun 17, 2012
1 parent ccd61ca commit 51022ee
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions app/views/groups/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@
<tr>
<td><%= group.name %></td>
<td>
<% if can? :view, group %>
<%= link_to 'Show', group %>
<% end %>
<% if can? :edit, group %>
<%= link_to 'Edit', edit_group_path(group) %>
<% end %>
<% if can? :destroy, group %>
<%= link_to 'Destroy', group, :confirm => 'Are you sure?', :method => :delete %>
<% end %>
<%= link_to("Join", group_memberships_path(:group_id => group.id, :membership => {:user_id => current_user.id}), :method => :post) if user_signed_in? & !group.made_request?(current_user) %></td>
<%= link_to 'Show', group if can? :view, group %>
<%= link_to 'Edit', edit_group_path(group) if can? :edit, group %>
<%= link_to 'Destroy', group, :confirm => 'Are you sure?', :method => :delete if can? :destroy, group %>
<%= link_to "Join", group_memberships_path(:group_id => group.id, :membership => {:user_id => current_user.id}), :method => :post if user_signed_in? & !group.made_request?(current_user) %></td>
</tr>
<% end %>
</table>
Expand Down

0 comments on commit 51022ee

Please sign in to comment.