I know I’m missing something basic, but I need help understanding
I have a model (User) sitting in a component. I want to extend that
model from my app. I need to add in a has_many relationship and a
couple of methods.
I was able to mixin the methods using this:
This just mixes in the new method. But if I add a ‘has_many’, I get
I’ve tried using the way to extend ActiveRecord (like in a plugin),
but that’s not working either.
module ClassMethods def my_new_method end end
I’m not understanding the basics of extending a class, not just
mixing things in. Any pointers on this?