This is an archive of my old website, kept as a snapshot of that time.

How to create a singleton scaffold in Rails 4

I thought I would quickly post this.

Use the usual command to generate the scaffold.

rails generate scaffold Model

then in routes.rb

 

Change

resource :models

to

resource :models, :path => ‘model’

Comments