Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Observers' context (current_user) is set on every request.

  • Loading branch information...
commit 3a30577009aa310e08196d269079fbdef08a7b8e 1 parent af840ec
@jasiek authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 user_pages_extension.rb
View
5 user_pages_extension.rb
@@ -26,6 +26,11 @@ def activate
User.send(:include, UserExtension)
Admin::PagesController.send(:include, AdminPagesControllerExtension)
Admin::PagesController.send(:helper, AdminPagesHelperExtension)
+ ApplicationController.class_eval do
+ def set_current_user
+ PageObserver.current_user = UserPagePermissionObserver.current_user = UserActionObserver.current_user = current_user
+ end
+ end
# tab 'Content' do
# add_item "User Pages", "/admin/user_pages", :after => "Pages"
# end

0 comments on commit 3a30577

Please sign in to comment.
Something went wrong with that request. Please try again.