Several renamings
InappropiateFlag -> Flag x.flag_as_inappropiate -> x.flag x.undo_flag_as_inappropiate -> x.unflag X.flagged_as_inappropiate -> x.flagged flag-as-inappropiate-actions views & css -> flag-actions views & css
This commit is contained in:
@@ -22,14 +22,14 @@ class CommentsController < ApplicationController
|
||||
respond_with @comment
|
||||
end
|
||||
|
||||
def flag_as_inappropiate
|
||||
InappropiateFlag.flag!(current_user, @comment)
|
||||
respond_with @comment, template: 'comments/_refresh_flag_as_inappropiate_actions'
|
||||
def flag
|
||||
Flag.flag!(current_user, @comment)
|
||||
respond_with @comment, template: 'comments/_refresh_flag_actions'
|
||||
end
|
||||
|
||||
def undo_flag_as_inappropiate
|
||||
InappropiateFlag.unflag!(current_user, @comment)
|
||||
respond_with @comment, template: 'comments/_refresh_flag_as_inappropiate_actions'
|
||||
def unflag
|
||||
Flag.unflag!(current_user, @comment)
|
||||
respond_with @comment, template: 'comments/_refresh_flag_actions'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -51,14 +51,14 @@ class DebatesController < ApplicationController
|
||||
set_debate_votes(@debate)
|
||||
end
|
||||
|
||||
def flag_as_inappropiate
|
||||
InappropiateFlag.flag!(current_user, @debate)
|
||||
respond_with @debate, template: 'debates/_refresh_flag_as_inappropiate_actions'
|
||||
def flag
|
||||
Flag.flag!(current_user, @debate)
|
||||
respond_with @debate, template: 'debates/_refresh_flag_actions'
|
||||
end
|
||||
|
||||
def undo_flag_as_inappropiate
|
||||
InappropiateFlag.unflag!(current_user, @debate)
|
||||
respond_with @debate, template: 'debates/_refresh_flag_as_inappropiate_actions'
|
||||
def unflag
|
||||
Flag.unflag!(current_user, @debate)
|
||||
respond_with @debate, template: 'debates/_refresh_flag_actions'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -27,7 +27,7 @@ class Moderation::CommentsController < Moderation::BaseController
|
||||
private
|
||||
|
||||
def load_comments
|
||||
@comments = Comment.accessible_by(current_ability, :hide).flagged_as_inappropiate.sorted_for_moderation.includes(:commentable)
|
||||
@comments = Comment.accessible_by(current_ability, :hide).flagged.sorted_for_moderation.includes(:commentable)
|
||||
end
|
||||
|
||||
def set_valid_filters
|
||||
|
||||
@@ -27,7 +27,7 @@ class Moderation::DebatesController < Moderation::BaseController
|
||||
private
|
||||
|
||||
def load_debates
|
||||
@debates = Debate.accessible_by(current_ability, :hide).flagged_as_inappropiate.sorted_for_moderation
|
||||
@debates = Debate.accessible_by(current_ability, :hide).flagged.sorted_for_moderation
|
||||
end
|
||||
|
||||
def set_valid_filters
|
||||
|
||||
Reference in New Issue
Block a user