Scaffolding to use has_many and belongs_to?


#1

What does everyone on this list think about enhancing scaffolding
somehow so that a “has_many” relationship will automatically drop the
box into the view to reference the “belongs_to” part of the
view?

I think scaffolding is great but I am always adding the boxes
to reference the parent association. Do you think this would be
useful? just a thought for enhancing an already powerful rails.

adam


#2

On 1/26/06, Adam D. removed_email_address@domain.invalid wrote:

What does everyone on this list think about enhancing scaffolding
somehow so that a “has_many” relationship will automatically drop the
box into the view to reference the “belongs_to” part of the
view?

I think scaffolding is great but I am always adding the boxes
to reference the parent association. Do you think this would be
useful? just a thought for enhancing an already powerful rails.

See the Scaffolding Extensions plugin
(http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin).


#3

very nice, but i can only get it through svn? :frowning: would be nice to see a
gem
for this.


#4

im a little confused. The views are already created so where are
these magic select boxes supposed to be coming from?

adam


#5

On 1/27/06, Adam D. removed_email_address@domain.invalid wrote:

im a little confused. The views are already created so where are
these magic select boxes supposed to be coming from?

The Scaffolding Extensions plugin modifies the Rails scaffold method,
not the generator. It’s designed to replace the scaffold generator by
allowing for common customization requirements without the redundancy
implicit in code generation. In other words, you don’t generate the
scaffold and then modify it, instead you add the necessary
customization code to the model and then call the scaffold method in
the controller.


#6

On 1/27/06, Adam D. removed_email_address@domain.invalid wrote:

could you provide an example of calling one of these in the
controller? I couldnt find an example in the docs.

I’m not sure which docs you looked at. See the wiki page
(http://wiki.rubyonrails.com/rails/pages/Scaffolding+Extensions+Plugin)
for explanations on usage.


#7

could you provide an example of calling one of these in the
controller? I couldnt find an example in the docs.

thanks
adam