diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2013-07-21 18:08:43 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2013-07-21 18:08:43 +0530 |
commit | 3613235cc3d7d87ce02e51a80f67706c0853b524 (patch) | |
tree | 0385563aabc4df9f2435b1ca08d68b88888eef7d /guides/source/command_line.md | |
parent | 9dc8aef084fc5ae7e3a396dd098d89da93d06fda (diff) | |
parent | 760662de868c0311f2e40a5e6f8982a521a3d990 (diff) | |
download | rails-3613235cc3d7d87ce02e51a80f67706c0853b524.tar.gz rails-3613235cc3d7d87ce02e51a80f67706c0853b524.tar.bz2 rails-3613235cc3d7d87ce02e51a80f67706c0853b524.zip |
Merge branch 'master' of github.com:rails/docrails
Diffstat (limited to 'guides/source/command_line.md')
-rw-r--r-- | guides/source/command_line.md | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/guides/source/command_line.md b/guides/source/command_line.md index 218b4dd39a..911c832952 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -222,7 +222,7 @@ We will set up a simple resource called "HighScore" that will keep track of our ```bash $ rails generate scaffold HighScore game:string score:integer invoke active_record - create db/migrate/20120528060026_create_high_scores.rb + create db/migrate/20130717151933_create_high_scores.rb create app/models/high_score.rb invoke test_unit create test/models/high_score_test.rb @@ -244,18 +244,21 @@ $ rails generate scaffold HighScore game:string score:integer create app/helpers/high_scores_helper.rb invoke test_unit create test/helpers/high_scores_helper_test.rb + invoke jbuilder + create app/views/high_scores/index.json.jbuilder + create app/views/high_scores/show.json.jbuilder invoke assets invoke coffee create app/assets/javascripts/high_scores.js.coffee invoke scss create app/assets/stylesheets/high_scores.css.scss invoke scss - create app/assets/stylesheets/scaffolds.css.scss + identical app/assets/stylesheets/scaffolds.css.scss ``` The generator checks that there exist the directories for models, controllers, helpers, layouts, functional and unit tests, stylesheets, creates the views, controller, model and database migration for HighScore (creating the `high_scores` table and fields), takes care of the route for the **resource**, and new tests for everything. -The migration requires that we **migrate**, that is, run some Ruby code (living in that `20120528060026_create_high_scores.rb`) to modify the schema of our database. Which database? The sqlite3 database that Rails will create for you when we run the `rake db:migrate` command. We'll talk more about Rake in-depth in a little while. +The migration requires that we **migrate**, that is, run some Ruby code (living in that `20130717151933_create_high_scores.rb`) to modify the schema of our database. Which database? The sqlite3 database that Rails will create for you when we run the `rake db:migrate` command. We'll talk more about Rake in-depth in a little while. ```bash $ rake db:migrate @@ -384,7 +387,7 @@ Active Record version 4.0.0 Action Pack version 4.0.0 Action Mailer version 4.0.0 Active Support version 4.0.0 -Middleware ActionDispatch::Static, Rack::Lock, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::EncryptedCookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, Rack::Head, Rack::ConditionalGet, Rack::ETag +Middleware Rack::Sendfile, ActionDispatch::Static, Rack::Lock, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::EncryptedCookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, Rack::Head, Rack::ConditionalGet, Rack::ETag Application root /home/foobar/commandsapp Environment development Database adapter sqlite3 |