mod actions: add options to filter /mod_actions by subject.
This commit is contained in:
@@ -21,6 +21,14 @@ class IpBansController < ApplicationController
|
||||
respond_with(@ip_bans)
|
||||
end
|
||||
|
||||
def show
|
||||
@ip_ban = authorize IpBan.find(params[:id])
|
||||
|
||||
respond_with(@ip_ban) do |format|
|
||||
format.html { redirect_to ip_bans_path(search: { id: @ip_ban.id }) }
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@ip_ban = authorize IpBan.find(params[:id])
|
||||
@ip_ban.update(permitted_attributes(@ip_ban))
|
||||
|
||||
@@ -5,7 +5,11 @@ class ModActionsController < ApplicationController
|
||||
|
||||
def index
|
||||
@mod_actions = ModAction.visible(CurrentUser.user).paginated_search(params)
|
||||
@mod_actions = @mod_actions.includes(:creator) if request.format.html?
|
||||
|
||||
if request.format.html?
|
||||
@mod_actions = @mod_actions.includes(:creator, :subject)
|
||||
@dtext_data = DText.preprocess(@mod_actions.map(&:description))
|
||||
end
|
||||
|
||||
respond_with(@mod_actions)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user