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 calling initialize (6 for 5) #81

Closed
muhammadn opened this issue Jun 15, 2014 · 1 comment
Closed

wrong number of arguments calling initialize (6 for 5) #81

muhammadn opened this issue Jun 15, 2014 · 1 comment

Comments

@muhammadn
Copy link

Hi,

I am having an error "wrong number of arguments calling initialize (6 for 5)" when i access the /admin page.

I am using activeadmin-mongoid version 0.2.0 (because activeadmin 0.6.0 supports JRuby i believe)

However, when i change the active_admin.rb in config/initializer from config.authentication_method = :authenticate_admin_user!
and
config.current_user_method = :current_admin_user

to

config.authentication_method = :authenticate_user!
and
config.current_user_method = :current_user

i can login as the "user credentials" and not "admin@example.com" which i hope to avoid (every normal user logging into activeadmin)

More info:

Extracted source (around line #7):

4: <% scope = Devise::Mapping.find_scope!(resource_name) %>
5: <%= active_admin_form_for(resource, :as => resource_name, :url => send(:"#{scope}_session_path"), :html => { :id => "session_new" }) do |f|
6: f.inputs do
7: resource.class.authentication_keys.each { |key| f.input key, :input_html => {:autofocus => true}}
8: f.input :password
9: f.input :remember_me, :label => t('active_admin.devise.login.remember_me'), :as => :boolean, :if => false #devise_mapping.rememberable? }
10: end

@muhammadn muhammadn changed the title Cannot login to /admin wrong number of arguments calling initialize (6 for 5) Jun 17, 2014
@muhammadn
Copy link
Author

Finally for this fixed.

The problem was with bootstrap3 and simple_form.

activeadmin/activeadmin#2703

@boie0025 boie0025 closed this as completed Jun 6, 2017
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