Search code examples
ruby-on-rails-3crudpartialscaffold

remove new.haml/ new.erb from ruby on rails?


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?


Solution

  • 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.