Reputation: 2821
Active Admin is giving me the following error on a clean install using edge Rails (4.1.0.beta1)
ArgumentError in ActiveAdmin::Devise::Sessions#new
wrong number of arguments (5 for 4)
Extracted source (around line #5):
<%= active_admin_form_for(resource, :as => resource_name, :url => send(:"#{scope}_session_path"), :html => { :id => "session_new" }) do |f|
Gemfile:
gem 'polyamorous', github: 'activerecord-hackery/polyamorous', branch: 'rails-4.1'
gem 'activeadmin', github: 'gregbell/active_admin'
Upvotes: 2
Views: 1642
Reputation: 46
I just ran into this as well.
This is happening because Rails 4.1 removes the fifth parameter block
from the ActionView::Helpers::FormBuilder
constructor.
There's a patch in formtastic master that fixes this. You can use gem "formtastic", github: "justinfrench/formtastic"
in your Gemfile.
Upvotes: 3
Reputation: 7301
First thing you can try is update devise to latest master, seems good people at devise did some work on rails 4.1 compatibility - there was a Merge pull request #2822 from plataformatec/rails-4.1
pull request merge 19 hours ago, https://github.com/plataformatec/devise/commits/master
If that fails then answer is "don't use edge rails", according to AAs commit history there was no work done on making AA work with edge rails and one would think that at least slight tweaks would be necessary for this, it's highly possible the good folk at AA simply didn't get around to do it considering 4.1 beta1
release was just before holidays https://github.com/gregbell/active_admin/commits/master
Upvotes: 0