David Furber wrote:
> If you are adding member methods like "add_content" and
> "delete_content" then you have left REST behind.
> 
> I understand that a Service is a resource that has many Sections. The
> content already exists, but you want to add it to another section.
> 
> HABTM associations are usually processed by a list of checkboxes named
> "section[contents][]". So in your edit form for the Section, you offer
> the checkboxes. In the update action of the Section, the checkboxes
> get processed automatically when you update attributes.

I understand that the add/remove thing is a bit against REST philosophy, 
but I hoped that some intermediate solution could exist.
I read about the checkboxes, but a section could have as much as 
thousands of contents. In this case, obviously I can't offer the 
checkboxes. Even if I leave some of them hidden, I don't know if sending 
a request with thousands of content_ids is a good thing :S

If there isn't a compromise solution in REST I guess I'll have to stick 
to a more 'classical' approach on this. :-(

Any other advice?

Thank you so much.
-- 
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