You could try to integrate with a JavaScript solution like http://j.mp/4LdS8r
(see the example) then you should send the data to the server like in
the checkboxes way: "sections[contents][]".
Here's the link of a simple jQuery plugin I created for that (it's a
little incomplete) http://github.com/samflores/tagger.js/

On Aug 26, 3:34 am, Diego Suarez <li...@ruby-forum.com> wrote:
> 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 viahttp://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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to