CapnRegex
2010-Aug-06 18:20 UTC
adding options to erb scaffold generator to include or skip custom views / templates
created a small patch.. looking for feedback / etc.. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5319-adding-options-to-erb-scaffold-generator-to-include-or-skip-custom-views-templates#ticket-5319-2 When I was working on customizing the erb scaffold generator to match the style and design I wanted to use by creating custom templates in / lib/templates/erb/scaffold I found that I wanted to add additional files. I can now do something like the following: $ rails generate scaffold FitType key:string name:string description:text --add-views=_nav --skip-views=new ... invoke erb create app/views/fit_types create app/views/fit_types/index.html.erb create app/views/fit_types/edit.html.erb create app/views/fit_types/show.html.erb create app/views/fit_types/_form.html.erb create app/views/fit_types/_nav.html.erb << extra template .. -- 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.