Rails 3.1 - changing default scaffold views and template

后端 未结 1 1875
失恋的感觉
失恋的感觉 2020-12-08 17:15

I\'m using rails 3.1 with Zune Foundation templates and haml. I have tried to fiend ways to change the default scaffold view templates to use css I want so I get a consiste

相关标签:
1条回答
  • 2020-12-08 17:41

    You can override default view templates by creating your own templates in 'lib/templates/erb/scaffold' folder of your rails app.

      lib/templates/erb/scaffold/_form.html.erb
      lib/templates/erb/scaffold/edit.html.erb
      lib/templates/erb/scaffold/index.html.erb
      lib/templates/erb/scaffold/new.html.erb
      lib/templates/erb/scaffold/show.html.erb
    

    The default templates can be found here - https://github.com/rails/rails/tree/master/railties/lib/rails/generators/erb/scaffold/templates

    0 讨论(0)
提交回复
热议问题