Skip to content

Instantly share code, notes, and snippets.

@bscofield
Created February 10, 2010 02:17
Show Gist options
  • Select an option

  • Save bscofield/299945 to your computer and use it in GitHub Desktop.

Select an option

Save bscofield/299945 to your computer and use it in GitHub Desktop.
[rails2] > ./script/generate resource Person name:string
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/people
exists test/functional/
exists test/unit/
exists test/unit/helpers/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/person.rb
create test/unit/person_test.rb
create test/fixtures/people.yml
exists db/migrate
create db/migrate/20100210021723_create_people.rb
create app/controllers/people_controller.rb
create test/functional/people_controller_test.rb
create app/helpers/people_helper.rb
create test/unit/helpers/people_helper_test.rb
route map.resources :people
[rails3] > rails generate resource Person name:string
invoke active_record
create db/migrate/20100210021723_create_people.rb
create app/models/person.rb
invoke test_unit
create test/unit/person_test.rb
create test/fixtures/people.yml
invoke controller
create app/controllers/people_controller.rb
invoke erb
create app/views/people
invoke test_unit
create test/functional/people_controller_test.rb
invoke helper
create app/helpers/people_helper.rb
invoke test_unit
create test/unit/helpers/people_helper_test.rb
route resources :people
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment