Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7086 (closed enhancement: incomplete)

Opened 2 years ago

Last modified 5 months ago

[PATCH] script/generate scaffold_resource doesn't generate form partial

Reported by: bscofield Assigned to: core
Priority: normal Milestone: 2.x
Component: Railties Version: edge
Severity: minor Keywords:
Cc:

Description

Running script/generate scaffold_resource creates four views (new, edit, show, and list) - a form partial should also be generated (that would then be reused by new and edit) to further reinforce good Rails coding techniques.

Attachments

scaffold_resource_path.diff (1.7 kB) - added by bscofield on 01/16/07 14:16:26.
Adds form partial; updates new and edit views to use the new partial

Change History

01/16/07 14:16:26 changed by bscofield

  • attachment scaffold_resource_path.diff added.

Adds form partial; updates new and edit views to use the new partial

03/17/07 03:27:25 changed by josh

  • keywords set to tiny.

02/09/08 19:31:04 changed by kampers

  • keywords deleted.
  • status changed from new to closed.
  • resolution set to incomplete.

This would be pretty great, but it's been sitting on the vine for over a year now, and needs to be refreshed for edge.

I'm going to close this for now, but please reopen with an updated patch, if possible. Thanks.

02/09/08 19:36:22 changed by josh

This think this was attempted before but it was turn down because it steps outside the scope of scaffolding. However, I still think its a good idea.

02/09/08 20:04:47 changed by bscofield

I'm happy to update the patch, but I think it might be more helpful to clarify the role of scaffolding first (per josh's comment).

I actually wrote a post on this recently: http://blog.viget.com/the-problem-with-scaffolding/

As I see it, scaffolding should either be production-ready OR illustrate best practices. Currently, it doesn't do a great job at either. Incidentally, I think using a form partial would help meet both goals (though in the long term I think there should be some focus on a single purpose).

Comments?