NameError: uninitialized constant Category::Category #169

Open
rutgerg opened this Issue Dec 17, 2012 · 6 comments

Projects

None yet

4 participants

@rutgerg
rutgerg commented Dec 17, 2012 edited

Hello,

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

Regards,

Rutger

@parndt
Collaborator
parndt commented Dec 17, 2012

Not sure - can we see the code in your Category class?

@rutgerg
rutgerg commented Dec 17, 2012

Pretty straight forward:

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

  acts_as_nested_set
end
@parndt
Collaborator
parndt commented Jun 25, 2013

I can't think why.

@drinks
drinks commented Jul 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.

@kinsomicrote

Has this issue been fixed, cause I am having same problem in my app.

@rutgerg
rutgerg commented Jul 21, 2016

This is such a long time ago that I can't remember what I did to solve it at that time. I don't use the gem anymore. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment