Skip to content

Commit

Permalink
set the moderator server-side, per b0464bd#commitcomment-1298261
Browse files Browse the repository at this point in the history
  • Loading branch information
zr2d2 committed May 6, 2012
1 parent b0464bd commit 422665f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions app/controllers/submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def show
# PUT /feeds/1/submissions/1
def update
@submission = Submission.find(params[:id])
@submission.moderator = current_user

respond_to do |format|
if @submission.update_attributes(params[:submission])
Expand Down
1 change: 0 additions & 1 deletion app/views/submissions/_approve_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
</div>
</div>
<%= f.hidden_field :moderation_flag, { :value => true }%>
<%= f.hidden_field :moderator_id, { :value => current_user.id }%>
<%= f.submit "Moderate Content", :class => "btn primary" %>
<% end %>
1 change: 0 additions & 1 deletion app/views/submissions/_deny_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
</div>
</div>
<%= f.hidden_field :moderation_flag, { :value => false }%>
<%= f.hidden_field :moderator_id, { :value => current_user.id }%>
<%= f.submit "Moderate Content", :class => "btn primary" %>
<% end %>

1 comment on commit 422665f

@bamnet
Copy link
Member

@bamnet bamnet commented on 422665f May 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!!

Please sign in to comment.