Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top