I have a model named Fave
. It belongs to another model named User
.
I'm trying to find a User's Faves by calling @user.faves
. My server gives me back the following error:
NameError: uninitialized constant User::Fafe
Why would it think the singular of "faves" is "fafe"? Is there some other plural form I can use that will point to "fave"?
You can pass the class name while setting up the association
has_many :faves, class_name: "Fave"