I am using Rails 4.0.4 and Ruby 2.1.1. I made few changes in my devise login form after generating migration for username and find the ActiveAdmin is throwing following error.
Showing /Users/MyCom/.rvm/gems/ruby-2.1.1/bundler/gems/active_admin-3136ccb910e8/app/views/active_admin/devise/sessions/new.html.erb where line #8 raised:
wrong number of arguments (6 for 4..5)
Extracted source (around line #8):
<%= active_admin_form_for(resource, :as => resource_name, :url => send(:"#{scope}_session_path"), :html => { :id => "session_new" }) do |f|
f.inputs do
resource.class.authentication_keys.each { |key|
f.input key, :label => t('active_admin.devise.'+key.to_s+'.title'), :input_html => {:autofocus => true}
}
f.input :password, :label => t('active_admin.devise.password.title')
f.input :remember_me, :label => t('active_admin.devise.login.remember_me'), :as => :boolean if devise_mapping.rememberable?
Following is my code in views/devise/sessions/new
<div class="panel-body">
<div class="col-md-6">
<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
<div class="form-group">
<%= f.label :username %>
<%= f.input_field :username, class: "form-control", :autofocus => true %>
</div>
<div class="form-group">
<%= f.label :password %>
<%= f.password_field :password, class: "form-control" %>
</div>
<div class="form-group">
<div class="checkbox">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
</div>
<div class="form-group">
<%= f.submit "Sign in", class: "btn btn-primary" %>
</div>
<% end %>
</div>
</div>