Skip to content

Instantly share code, notes, and snippets.

@paradigm314
Created September 7, 2016 20:26

Revisions

  1. paradigm314 created this gist Sep 7, 2016.
    16 changes: 16 additions & 0 deletions console.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    # Run In Console
    rails g model Foo
    rails g scaffold_controller Admin::Foo --model-name=Foo

    # Generates
    # db/migrate/20160907201951_create_foo.rb
    # app/models/foo.rb
    # app/controllers/admin/foo_controller.rb
    # app/views/admin/foo
    # app/views/admin/foo/index.html.erb
    # app/views/admin/foo/edit.html.erb
    # app/views/admin/foo/show.html.erb
    # app/views/admin/foo/new.html.erb
    # app/views/admin/foo/_form.html.erb

    # Plus all the respctive tests and fixtures for your test suite