I think having a switch (or a checkbox) that generates view
automatically would simplify.
I don't understand... You mean in the code generator dialog? The
way you add views right there in place is to add them in the second
text field... e.g. open the generator, choose create controller, add
controller name "foo", and in the second text field, add views -
e.g. "edit update delete" (3 views) - will create everything. (Don't
That resolves part of the problem :)
But what if I add an action to the controller after first create ?
I'll have to create view for it explicitly, right ?
Right. You can run the generator again; it will (by default) skip your
controller but generate the files that don't exist - in this case, the
But it won't add the action method :-(. It would be nice if we could
generate a new view for an existing controller and have it create *both*
the new RHTML file and add the action method to an existing controller.
commas - that didn't work properly until a bug fix I integrated today.)
generate a View file, you have to run the code generator. Pay
particular attention to the skip/overwrite toggles in that dialog
when doing it this way. You probably want "skip" when adding a
view for an existing controller.
Yes, that's the default as well.
(For more discussions of Ruby tooling, switch to either
nb-s...@sun.com (internal discussions) or
de...@scripting.netbeans.org (external discussions - most things
should be there).