diff options
author | Rhenium <rhenium@rhe.jp> | 2014-01-17 23:12:40 +0900 |
---|---|---|
committer | Rhenium <rhenium@rhe.jp> | 2014-01-17 23:12:40 +0900 |
commit | f631ac6b963eee49d909449a582ac2e3683ca6bd (patch) | |
tree | 44133d79b1a2a439b6d57bbda12fbcbc9ba7498d /app/controllers/application_controller.rb | |
parent | 91e616185156fbee3d5aa018f8e81f1ed5eeb746 (diff) | |
download | aclog-f631ac6b963eee49d909449a582ac2e3683ca6bd.tar.gz |
fix ApplicationController
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f3ce3ee..c223366 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,7 +23,7 @@ class ApplicationController < ActionController::Base end def authorized_to_show_user?(user) - !user.protected? || current_user == user || current_user.try(:following?, user) + !user.protected? || current_user == user || current_user.try(:following?, user) || false end def authorized_to_show_user_best?(user) @@ -46,6 +46,8 @@ class ApplicationController < ActionController::Base end def tidy_response_body - response.body = ActiveSupport::Multibyte::Unicode.tidy_bytes(response.body) + if [:html, :xml, :rss, :atom].any? {|s| request.format == s } + response.body = ActiveSupport::Multibyte::Unicode.tidy_bytes(response.body) + end end end |