Skip to content

Commit

Permalink
Add switch_user config
Browse files Browse the repository at this point in the history
  • Loading branch information
pezholio committed Sep 22, 2014
1 parent c33a4a2 commit 6766c0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/initializers/switch_user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SwitchUser.setup do |config|
config.available_users = { :user => lambda { User.order(:email) } }
config.controller_guard = lambda { |current_user, request| current_user.try(:admin?) }
config.redirect_path = lambda { |request, params| '/users/dashboard' }
config.helper_with_guest = false
end

0 comments on commit 6766c0b

Please sign in to comment.