First off, I''m an extreme rails newbie trying to find my programming
legs again after years of not developing.
So, I have a User model which has_many characters. And a character
model that belongs_to the user.
In my Character_controller, I''m attempting to do a find by association
to get a list of all characters assocaited with the user.
@user = session[:uid]
@characters = @user.characters.find_all_by_user(@user.id) (or
something similar, I don''t have the code in front of me)
When I execute the action, I get an error message stating that there
is no user_id field in the character table, which is accurate, but I
thought the association took care of that. I think I''m missing a step
somewhere.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---