質問

The default ruby on rails scaffolds generate a new.haml or new.erb these include only 1 line: = render 'form'

Thus, basically the file is obsolete, is there any preferred way to remove the new partial and make it use the _form partial instead straight away or would this go against rails conventions?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top