diff options
author | re4k <re4k@re4k.info> | 2013-05-04 18:09:28 +0900 |
---|---|---|
committer | re4k <re4k@re4k.info> | 2013-05-04 18:09:28 +0900 |
commit | 31e9e320cdc5aa1b26ebdda3da4db7f067667fa5 (patch) | |
tree | e60cf2095f93cb772ed277c293f8f7d119df547f /app/controllers/application_controller.rb | |
parent | 2844d9159d6417f8c8d55e818c2ed6a4e30ea405 (diff) | |
download | aclog-31e9e320cdc5aa1b26ebdda3da4db7f067667fa5.tar.gz |
refactor, fix errors
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e1cac88..0a8217a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,9 +7,9 @@ class ApplicationController < ActionController::Base protected def _get_user(id, screen_name) if id - User.find_by(id: id) + User.find(id: id) rescue raise Aclog::Exceptions::UserNotFound elsif screen_name - User.find_by(screen_name: screen_name) + User.find_by(screen_name: screen_name) || (raise Aclog::Exceptions::UserNotFound) end end |