uninitialized constant #10

cmunozgar opened this Issue Apr 16, 2013 · 4 comments

4 participants


Hi, I'm trying to import a csv from a model called 'SpotStatus' and I'm getting the current error: NameError (uninitialized constant SpotStatu)

Any chance there's a fix to this?


Hi cmunozgar,

looks like you did a mistake somewhere,
can you please show here your code of active admin controller where you turned on active_admin_importable?


I would be money that the issue is that SpotStatus has issues with pluralization.

1.9.3p194 :003 > "SpotStatus".singularize
=> "SpotStatu"
1.9.3p194 :006 > "SpotStatus".pluralize
=> "SpotStatuses"

Just a thought.



Here is my code:

ActiveAdmin.register SpotStatus do
menu :parent => "Spots"

I'm with Blue-Dog-Archolite that it can be a thing with the pluralization because other Models have worked correctly!


Just pushed a fix to this.

Added a call to pluralize before constantize to get around the "singularizing the singular" troubles with irregular plurals (rails/rails#8671).

@krhorst krhorst closed this Apr 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment