diff options
author | Rhenium <rhenium@rhe.jp> | 2013-11-17 06:30:31 +0900 |
---|---|---|
committer | Rhenium <rhenium@rhe.jp> | 2013-11-17 06:30:31 +0900 |
commit | f54b2d0a4ab55167cc141e2549db05477c83e9df (patch) | |
tree | 77191009910409f0370405ddf1a7846a03ace463 /app/controllers/application_controller.rb | |
parent | 546bd0726afa3a7a86a6559e51fadcda03aeff22 (diff) | |
download | aclog-f54b2d0a4ab55167cc141e2549db05477c83e9df.tar.gz |
move ApplicationController#_get_user to User.get
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 819ef93..37a7820 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -10,14 +10,6 @@ class ApplicationController < ActionController::Base protected def logged_in?; session[:user_id] && session[:account] end - def _get_user(id, screen_name) - if id - User.find(id) rescue raise Aclog::Exceptions::UserNotFound - elsif screen_name - User.find_by(screen_name: screen_name) or raise Aclog::Exceptions::UserNotFound - end - end - def authorized_to_show_user?(user) @authorized_to_show_user ||= {} @authorized_to_show_user[user.id] ||= begin |