Brandon Murray
Brandon Murray

Reputation: 13

Rails Generate CRUD without scaffolding?

I am taking a Ruby on Rails course and I have reached a point where we are creating users and the views with them. The instructor ran "rake routes" and had all the CRUD for users with routes already generated, however when I ran "rake routes" i got just the users#create. Somewhere down the line mine did not generate all the crud actions and routes with them. I will be creating my controller actions from scratch no problem, and I will have to add my routes by hand it seems.

Is there a better way to generate the crud with routes without scaffolding for future issues if this occurs again?

Upvotes: 1

Views: 1058

Answers (1)

mcemilg
mcemilg

Reputation: 976

Adding resources to your routes file automatically generates CRUD routes you want. Here is the guide in rails guides. But still you must create views and actions by hand.

Upvotes: 1

Related Questions