Jeremy E. wrote:
On 1/13/06, RHaus email@example.com wrote:
Jeremy E. wrote:
On 1/12/06, RHaus firstname.lastname@example.org wrote:
one-to-many and many-to-many relationships too?
The Scaffolding Extensions plugin has a habtm scaffolder (with a
interface simpler than what you describe). It doesn’t work with the
scaffold generator though.
That sounds very good, but I am afraid I am too much of a newbie to
understand how to make use of it? Could you explain how to proceed or
where to get more information?
See http://wiki.rubyonrails.org/rails/pages/Plugins for more
information about plugins. The Scaffolding Extension plugin is
currently only available via subversion, so you’d need that installed
(or contact me offlist and I’ll send it to you). After the plugin is
Thank you for your patient help!
I was able to receive the plugin and have now a directory
scaffolding_extensions locally. However I cannot figure out how to
install it properly.
I tried copying this directory to vendor/plugins in my rails directory,
I keep getting the error message “Unknown key(s): habtm” whenever I add
the :habtm keyword to the scaffold command.
I also tried to copy the content of the plugin folder to the root rails
folder, but this did not work either. Unfortunately I could not find
how to properly install a plugin on the wiki page either, so I am a bit
here still …
given appropriately named models, you’d do something like
this in a controller:
You go to the edit page of the category and there is a link to a page
that does habtm scaffolding for the forms of a given category
If you just want habtm scaffolding without other scaffolding, you can
Then you can go to either edit_category_forms/42 to edit forms for the
category with the id of 42 or edit_form_categories/42 to edit
categories for the form with the id of 42.
This looks very much like what I would like Rails to do!
I am wondering about the relationship between the “scaffold …” command
(which is extended by the plugin you pointed out to me) and the
generator script – is there some kind of automatic relationship so that
anything that works with “scaffold” will also be accessible to the
generator or has this to be implemented in parallel?