Hi all,

  I have several resources:

  map.resources :articles, :has_many => [:comments]
  map.resources :movies, :has_many => [:comments]
  map.resources :photos, :has_many => [:comments]

  all of them have a nested resource named comments, new comments are
able to be created by POST to URLs like article_comments_url. My problem
is, when I'm in the comments_controller, how can I know which resource
this comment belongs to? By reading the params? I think this is not
decent, are there any better ways? Thanks in advance!

Cheers,
Difei
-- 
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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to