gregbell/active_admin — Issue #1034: NoMethodError after column name change
Author: zetlan
Created: 2012-02-17 17:42:09+00:00
State: open

I renamed a column in my Attachments table from "url" to "url_or_code" via migration. Also changed the datatype string :limit => 255 to :limit => 1024 - this is MySQL, so the database fields are varchar.

My dashboards.rb contains:

ActiveAdmin.register Attachment

Everything had been fine, but after rake db:migrate, now I get:

NoMethodError in Admin/attachments#index
undefined method `url_or_code_contains' for #
Extracted source (around line #1):
1: render renderer_for(:index)

Eliminating the register call for Attachment resolves the problem.

What am I missing - does ActiveAdmin cache column names someplace?