bring back moderation_reason for moderators
This commit is contained in:
parent
890636a0f1
commit
a85fbe4ff1
|
@ -226,9 +226,16 @@ class StoriesController < ApplicationController
|
|||
private
|
||||
|
||||
def story_params
|
||||
params.require(:story).permit(
|
||||
:title, :url, :description, :seen_previous, :tags_a => []
|
||||
p = params.require(:story).permit(
|
||||
:title, :url, :description, :moderation_reason, :seen_previous,
|
||||
:tags_a => [],
|
||||
)
|
||||
|
||||
if @user.is_moderator?
|
||||
p
|
||||
else
|
||||
p.except(:moderation_reason)
|
||||
end
|
||||
end
|
||||
|
||||
def find_story
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<%= render :partial => "stories/form", :locals => { :story => @story,
|
||||
:f => f } %>
|
||||
|
||||
<% if @story.user_id != @user.id %>
|
||||
<% if @user.is_moderator? && (@story.user_id != @user.id) %>
|
||||
<div class="box">
|
||||
<div class="boxline">
|
||||
<%= f.label :moderation_reason, "Mod Reason:",
|
||||
|
|
Loading…
Reference in a new issue