WHen I have a model that has an HABTM relationship defined within it,
and I am using the scaffolding_extension plugin, should I expect
something specil to be rendered in any of the pages created? For
example, if I go to edit a record that I have specified has an HABTM
relationship, should something specail appear on the page (a list box,
perhaps, where you can select multiple items?).
The reason I ask is because I want to check if I have defined my HABTM
relationships properly. Thanks, Ralph
WHen I have a model that has an HABTM relationship defined within it,
and I am using the scaffolding_extension plugin, should I expect
something specil to be rendered in any of the pages created? For
example, if I go to edit a record that I have specified has an HABTM
relationship, should something specail appear on the page (a list box,
perhaps, where you can select multiple items?).
It depends on how you are calling the scaffold function (specifically
the :habtm option). If you are using scaffold_all_models, then all
the HABTM association pages should be setup, and if you go to edit a
record, under “Associated Records” you should see the HABTM associated
model, as well as an edit link. The edit link takes you to a page
where you can update the associated records.
Jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.