aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-06-13 18:01:54 +0900
committerrhenium <re4k@re4k.info>2013-06-13 18:01:54 +0900
commit346fe0017a7085314d844965dee17a8d05930192 (patch)
treea27a5ba85ff0c69470f32dc064c285b1fdbf8b81 /app
parent51e348b0e28b2e8169a105c62acf692ea064db74 (diff)
downloadaclog-346fe0017a7085314d844965dee17a8d05930192.tar.gz
fix ApplicationController#check_session to return bool, fix #xhtml to use tidy_bytes in RSS
Diffstat (limited to 'app')
-rw-r--r--app/controllers/application_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index dfab86e..e72362d 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -67,15 +67,19 @@ class ApplicationController < ActionController::Base
end
def check_session
- if (session[:user_id] || session[:account]) and not (session[:user_id] && session[:account])
+ if !!session[:user_id] == !!session[:account]
+ true
+ else
reset_session
+ false
end
end
def xhtml
if request.format == :html
response.content_type = "application/xhtml+xml"
-
+ end
+ if request.format == :html || request.format == :rss
# remove invalid charactors
u = ActiveSupport::Multibyte::Unicode
response.body = u.tidy_bytes(response.body)