Reputation: 10214
I'm using this active_admin on Rails. I had one model: Page. But then I ran some migrations. When I came back to the login panel on active admin, whenever I would click on the Pages button at the top navigation bar, I get this error:
NoMethodError in Admin/pages#index
Showing /home/username/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/app/views/active_admin/resource/index.html.arb where line #1 raised:
undefined method `generate_association_input_name' for # Extracted source (around line #1):
1: render renderer_for(:index)
Another model I created works fine. I don't know what I did to break the Page model on Active Admin.
I'm going to try to regenerate active admin.
Upvotes: 0
Views: 1072
Reputation: 6627
The problem is that Formtastic (which is a Active Admin dependency) was just updated to version 2.0.0 4 days ago.
Previously Active Admin depended on Formtastic >= 1.1.0, which includes v2. But v2 have changed so much that it breaks Active Admin. 3 days ago mattvague made an update to Active Admin to reflect this issue, binding Active Admin to Formtastic < 2.0.0.
So if if you don't mind upgrading Active Admin you can fix this by upgrading to Active Admin 0.3.2 which includes this fix:
gem 'activeadmin', '~> 0.3.2'
Alternatively you can force Active Admin to use an older version of Formtastic by adding it manually to your Gemfile
:
gem 'formtastic', '1.2.4' # an activeadmin dependency
gem 'activeadmin', '< 0.3.2' # or whatever version below 0.3.2 you depend on
Upvotes: 1