Skip to content

Instantly share code, notes, and snippets.

@LucasKuhn
Last active August 12, 2018 21:33
Show Gist options
  • Save LucasKuhn/2cb7831be48180e458ff8ed1551fb3ff to your computer and use it in GitHub Desktop.
Save LucasKuhn/2cb7831be48180e458ff8ed1551fb3ff to your computer and use it in GitHub Desktop.
Actually usefull scaffold
rails g scaffold post title:string content:text --no-assets --no-stylesheets --no-fixture --no-test-framework --no-helper --no-jbuilder
invoke active_record
create db/migrate/20180812213144_create_posts.rb
create app/models/post.rb
invoke resource_route
route resources :posts
invoke scaffold_controller
create app/controllers/posts_controller.rb
invoke erb
create app/views/posts
create app/views/posts/index.html.erb
create app/views/posts/edit.html.erb
create app/views/posts/show.html.erb
create app/views/posts/new.html.erb
create app/views/posts/_form.html.erb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment