Topic: RESTful bulk has_and_belongs_to_many
My users shall be able to tell the system about their language skills. This is modeled by using a first class association object 'language_skill' that associates the proband with a language.
class Proband < ActiveRecord::Base
class LanguageSkill < ActiveRecord::Base
class Language < ActiveRecord::Base
It would be unusable to do this in the 'scaffold-way' (separate pages for list/add/edit). Instead I want to make an edit page that lists all languages with checkboxes where the user can select/deselect the language as his skill.
As I've choosen to go the RESTful way, I ask myself how to fit this into the RESTful design pattern. Currently I have a LanguageSkillController with just one method('edit'/'update') that displays the languages and the checkboxes at once and handles updates. So I see the LanguageSkill as a single resource (and not as a collection of association objects).
Does this make sense ?
Are there any alternatives ?