Permalink
Browse files

only show change goal link if user owns stamp

  • Loading branch information...
1 parent 88091bf commit 68050b46c9261bb181bc3b3b4eead5502e2e0839 @ryanb committed Sep 5, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/views/stamps/_score.html.erb
@@ -1,7 +1,9 @@
<div id="score_bar" style="background-position: <%= -200 + (stamp.goal_progress*2) %>px 0">score <%=h stamp.score %></div>
<div id="score_goal">
<%= stamp.goal_score %>
- <span id="change_goal">(<%= link_to "change goal", edit_goal_stamp_path(stamp) %>)</span>
+ <% if stamp.user == current_user %>
+ <span id="change_goal">(<%= link_to "change goal", edit_goal_stamp_path(stamp) %>)</span>
+ <% end %>
</div>
<% if stamp.goal_reached? && !stamp.goal_reward.blank? %>
<div id="goal_reward">

0 comments on commit 68050b4

Please sign in to comment.