Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong number of arguments (2 for 0) #2

Closed
kevinansfield opened this issue Nov 11, 2010 · 1 comment
Closed

wrong number of arguments (2 for 0) #2

kevinansfield opened this issue Nov 11, 2010 · 1 comment

Comments

@kevinansfield
Copy link

After installing the gem and adding the switch_user_select call to my layout template I get the following error:

wrong number of arguments (2 for 0)

Layout source:

90:       - if !Rails.env.production?
91:         %small / #{link_to "Admin area", admin_root_path}
92:         = switch_user_select
93: 
94:   %script(src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js")

Trace:

switch_user (0.5.0) lib/switch_user.rb:30:in `block in <module:SwitchUser>'
switch_user (0.5.0) app/helpers/switch_user_helper.rb:33:in `call'
switch_user (0.5.0) app/helpers/switch_user_helper.rb:33:in `available?'
switch_user (0.5.0) app/helpers/switch_user_helper.rb:3:in `switch_user_select'
app/views/layouts/application.html.haml:92:in `_app_views_layouts_application_html_haml___579286700033541313_2192473080_1977928861036260016'

This is with Rails 3.0.1 on Ruby MRI 1.9.2

@flyerhzm
Copy link
Owner

Please upgrade to 0.5.1 version, it solves the 1.9.2 compatible issue. Thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants