문제

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