Module: SwitchUserHelper

Defined in:
app/helpers/switch_user_helper.rb

Defined Under Namespace

Classes: SelectOption

Instance Method Summary collapse

Instance Method Details

#switch_user_selectObject



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/switch_user_helper.rb', line 3

def switch_user_select
  return unless available?
  options = []
  selected_user = nil

  users = SwitchUser::UserSet.users
  users << SelectOption.new("Guest", "") if SwitchUser.helper_with_guest
  render :partial => "switch_user/widget",
         :locals => {
           :options => users,
           :current_scope => selected_user
         }
end