Andrew Chalkley
2009-Mar-06 12:33 UTC
[PATCH] DRYing up scaffold generator by generating a form partial
I don''t know about you guys but I find that I keep moving the form out to a partial all the time when I use scaffolding so I am not repeating myself in new and edit. I don''t think it''s DRY. So I refactored the form out into a partial. I have also included an intelligent default for the submit method in the form helper. If the object passed into the form is a new record the value will be "Create" or if it''s not it will be "Update" http://rails.lighthouseapp.com/projects/8994/tickets/2142-drying-up-scaffold-generator-by-generating-a-form-partial Any comments and feedback would be awesome. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---