Module: SwitchUserHelper
- Defined in:
- app/helpers/switch_user_helper.rb
Defined Under Namespace
Classes: SelectOption
Instance Method Summary collapse
Instance Method Details
#switch_user_select ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/switch_user_helper.rb', line 3 def switch_user_select return unless available? if provider.current_user selected_user = "user_#{current_user.id}" else selected_user = nil end render :partial => "switch_user/widget", :locals => { :options => SwitchUser.all_users, :current_scope => selected_user } end |