1

Rails 脚手架上的默认 ruby​​ 生成一个 new.haml 或 new.erb 这些仅包括 1 行:= render 'form'

因此,基本上该文件已过时,是否有任何首选方法可以删除新的部分并使其立即使用 _form 部分,或者这是否违反了 Rails 约定?

4

1 回答 1

1

no, there is no preferred way. it goes against rails conventions.

TL;DR don't do it.

if you don't need any customizations on your templates and are just creating basic CRUD stuff, have a look at admin tools like RailsAdmin ActiveAdmin Typus etc.

于 2013-10-14T08:06:41.257 回答