about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-10-22 01:02:52 -0500
committerDavid Yip <yipdw@member.fsf.org>2017-10-22 01:02:52 -0500
commit4c84513e0438577c84567e2a9f406448b81237f9 (patch)
treeada810c871620c0b45951ea9e5705159006dace6 /app/controllers
parent4b68e82a19ab2853264515a25af8d39841e43f00 (diff)
Use current_account from ApplicationController.
This avoids copy-pasting definitions of set_account.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/settings/keyword_mutes_controller.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/controllers/settings/keyword_mutes_controller.rb b/app/controllers/settings/keyword_mutes_controller.rb
index 6ae05108d..d64eba88e 100644
--- a/app/controllers/settings/keyword_mutes_controller.rb
+++ b/app/controllers/settings/keyword_mutes_controller.rb
@@ -4,7 +4,6 @@ class Settings::KeywordMutesController < ApplicationController
   layout 'admin'
 
   before_action :authenticate_user!
-  before_action :set_account
   before_action :load_keyword_mute, only: [:edit, :update, :destroy]
 
   def index
@@ -50,12 +49,8 @@ class Settings::KeywordMutesController < ApplicationController
 
   private
 
-  def set_account
-    @account = current_user.account
-  end
-
   def keyword_mutes_for_account
-    Glitch::KeywordMute.where(account: @account)
+    Glitch::KeywordMute.where(account: current_account)
   end
 
   def load_keyword_mute