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’


So lazy that he can't even fill this column out.

© 2015 Suhas Tech. All rights reserved.
Proudly powered by Wordpress.