Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jameshibbard/d87cb352302d5da18fb0 to your computer and use it in GitHub Desktop.
Save jameshibbard/d87cb352302d5da18fb0 to your computer and use it in GitHub Desktop.
Devise / cancancan tutorial: generate the project including scaffolding and assosciations
rails new store
cd store
rails g scaffold user name:string role:belongs_to
rails g scaffold role name:string description:string
rails g scaffold item name:string description:text 'price:decimal{5,2}', user:belongs_to
rake db:migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment