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:
kikito
2015-08-27 10:48:49 +02:00
parent a3e983f154
commit 909dfb4ce3
29 changed files with 107 additions and 115 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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