> You probably want the answer to belong_to both the user and the quiz.
>
>
>
> "resource" is probably something you copied from an example (or the
> docs). You're supposed to put the actual object there, like @answer
> (assuming you have created the @answer object as an instance variable in
> your controller)
>
> the url: is going to be a path correlated to the answer routes, which
> you will define in your routes file. You can use rake routes to figure
> out what the named routes are.
>
>


resource is the way that devise refers to user. I copied it from the 
devise registrations edit view, which updates user attributes.

If I create a separate answer object, can I still access it through the 
route quiz/:id? Would this be more difficult than just linking user and 
quiz through HABTM?

Thanks :)

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/3f307699d45a23f566de033e281f209c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to