diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cacc80d0b..0b644dd59 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -10,6 +10,7 @@ class ApplicationController < ActionController::Base before_filter :count_requests before_filter :set_invites before_filter :set_locale + before_filter :which_action_and_user def set_contacts_notifications_and_status if user_signed_in? @@ -30,6 +31,16 @@ class ApplicationController < ActionController::Base end end + def which_action_and_user + str = "controller=#{self.class} action=#{self.action_name} " + if current_user + str << "uid=#{current_user.id}" + else + str << 'uid=nil' + end + Rails.logger.info str + end + def set_locale if user_signed_in? I18n.locale = current_user.language diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index aaf7a66ac..fdd65f21d 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -7,6 +7,7 @@ class PostsController < ApplicationController skip_before_filter :count_requests skip_before_filter :set_invites skip_before_filter :set_locale + skip_before_filter :which_action_and_user def show @post = Post.where(:id => params[:id], :public => true).includes(:person, :comments => :person).first diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb index abe663d8c..f34421607 100644 --- a/app/controllers/publics_controller.rb +++ b/app/controllers/publics_controller.rb @@ -10,6 +10,7 @@ class PublicsController < ApplicationController skip_before_filter :count_requests skip_before_filter :set_invites skip_before_filter :set_locale + skip_before_filter :which_action_and_user layout false caches_page :host_meta