Skip to content
This repository

NameError: uninitialized constant Category::Category #169

rutgerg opened this Issue December 17, 2012 · 4 comments

3 participants

Rutger Geelen Philip Arndt Dan Drinkard
Rutger Geelen


love the gem. Txs. Everything works except for 1 things. Whenever I try to use the move_to_child_of method exactly as in the cheatsheet I get an error saying NameError: uninitialized constant Category::Category. What is going wrong here?



Philip Arndt
Rutger Geelen

Pretty straight forward:

class Category < ActiveRecord::Base
  attr_accessible :name, :ics_url, :image_url

Philip Arndt
parndt commented June 25, 2013

I can't think why.

Dan Drinkard
drinks commented July 12, 2013

Ran into this just now (on save) and thought I'd mention what we found in case it helps--our project was using this snippet to automatically reload the app, and somehow reloading the including model was the cause. Can't say for sure what's happening, but removing the initializer fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.