I have a many-to-many relationship between Books and Tags, with an 
intersection table of books_tags.

I have an HTML form that lists tags as a SELECT (multiple), with a name of 
'book[tags]'.

I get an error when trying to update the Book model using mass assignment:

class BookController

    post ':id/edit' do
        # method tags= doesn't exist
        @book = Book[params[:id]].update(params[:book])
    end

end

Do I need to remove the :tags key from the parameter hash, then update the 
tags dependency separately?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/2a47b836-88d1-41ef-ad59-dd3b19e5f29fn%40googlegroups.com.

Reply via email to