Friday, December 3, 2010

[Rails] Re: Help understanding ActiveResource

Jeremy Woertink wrote in post #965832:
> Post.collection_path #=> /posts.xml
> Comment.collection_path(:post_id => 5) #=> /posts/5/comments.xml
>
> Here is what I'm getting
>
> Post.collection_path => /posts.xml
> Comment.collection_path(:post_id => 5) #=> /comments.xml?post_id=5
>
> Thanks
>
> ~Jeremy

Hi Jeremy

you are reading the doc which is for ActiveRecord::Base instance

but
you are experimenting with ActiveResource::Base instance

please read documentation for ActiveResource (not ActiveRecord)

Thani
Castlerock research Info

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate