From ef6cdc974f7c3d98eb0a3ad65761e10600f04110 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 14 Apr 2010 17:03:26 -0700 Subject: Require rack-mount 0.6.0 since 0.6.1 and later can't be bundled --- railties/guides/source/initialization.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile index 7df4f8f719..5a94f0103b 100644 --- a/railties/guides/source/initialization.textile +++ b/railties/guides/source/initialization.textile @@ -148,7 +148,7 @@ Here the only two gems we need are +rails+ and +sqlite3-ruby+, so it seems. This * mime-types-1.16.gem * polyglot-0.3.1.gem * rack-1.1.0.gem -* rack-mount-0.6.1.gem +* rack-mount-0.6.0.gem * rack-test-0.5.3.gem * rails-3.0.0.beta1.gem * railties-3.0.0.beta1.gem @@ -4141,4 +4141,4 @@ The _activesupport/lib/active_support/ruby/shim.rb_ file requires methods that h For more information see the ActiveSupport Extensions guide TODO: link to relevant sections for each method. -And "the REXML security fix detailed here":[http://weblog.rubyonrails.org/2008/8/23/dos-vulnerabilities-in-rexml] \ No newline at end of file +And "the REXML security fix detailed here":[http://weblog.rubyonrails.org/2008/8/23/dos-vulnerabilities-in-rexml] -- cgit v1.2.3 From 9f26f95d4a31f2ade3e1a26d783fa536e14bf2d0 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 16 Apr 2010 13:55:21 -0700 Subject: Revert "Require rack-mount 0.6.0 since 0.6.1 and later can't be bundled" They can be bundled. Just the git repos can't. Use rails/rack-mount for that. This reverts commit ef6cdc974f7c3d98eb0a3ad65761e10600f04110. --- railties/guides/source/initialization.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile index 5a94f0103b..7df4f8f719 100644 --- a/railties/guides/source/initialization.textile +++ b/railties/guides/source/initialization.textile @@ -148,7 +148,7 @@ Here the only two gems we need are +rails+ and +sqlite3-ruby+, so it seems. This * mime-types-1.16.gem * polyglot-0.3.1.gem * rack-1.1.0.gem -* rack-mount-0.6.0.gem +* rack-mount-0.6.1.gem * rack-test-0.5.3.gem * rails-3.0.0.beta1.gem * railties-3.0.0.beta1.gem @@ -4141,4 +4141,4 @@ The _activesupport/lib/active_support/ruby/shim.rb_ file requires methods that h For more information see the ActiveSupport Extensions guide TODO: link to relevant sections for each method. -And "the REXML security fix detailed here":[http://weblog.rubyonrails.org/2008/8/23/dos-vulnerabilities-in-rexml] +And "the REXML security fix detailed here":[http://weblog.rubyonrails.org/2008/8/23/dos-vulnerabilities-in-rexml] \ No newline at end of file -- cgit v1.2.3 From 7bd3a105fd66db7f56a746679dac46e5a424289a Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 16 Apr 2010 14:40:24 -0700 Subject: Bump rack-mount dependency to ~> 0.6.3 for CRITICAL FIX --- railties/guides/source/initialization.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile index 7df4f8f719..a8c7ce0865 100644 --- a/railties/guides/source/initialization.textile +++ b/railties/guides/source/initialization.textile @@ -148,7 +148,7 @@ Here the only two gems we need are +rails+ and +sqlite3-ruby+, so it seems. This * mime-types-1.16.gem * polyglot-0.3.1.gem * rack-1.1.0.gem -* rack-mount-0.6.1.gem +* rack-mount-0.6.3.gem * rack-test-0.5.3.gem * rails-3.0.0.beta1.gem * railties-3.0.0.beta1.gem @@ -4141,4 +4141,4 @@ The _activesupport/lib/active_support/ruby/shim.rb_ file requires methods that h For more information see the ActiveSupport Extensions guide TODO: link to relevant sections for each method. -And "the REXML security fix detailed here":[http://weblog.rubyonrails.org/2008/8/23/dos-vulnerabilities-in-rexml] \ No newline at end of file +And "the REXML security fix detailed here":[http://weblog.rubyonrails.org/2008/8/23/dos-vulnerabilities-in-rexml] -- cgit v1.2.3 From 078177a3dc0b0893a1197f104c91f1df3902f939 Mon Sep 17 00:00:00 2001 From: eparreno Date: Sat, 17 Apr 2010 23:45:08 +0200 Subject: fix testing guide: fonts and code format --- railties/guides/source/testing.textile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile index c4f7ff8e92..206ed6e75c 100644 --- a/railties/guides/source/testing.textile +++ b/railties/guides/source/testing.textile @@ -108,7 +108,7 @@ tag is considered Ruby code. When this fixture is loaded, the +size+ attribute o h5. Fixtures in Action -Rails by default automatically loads all fixtures from the 'test/fixtures' folder for your unit and functional test. Loading involves three steps: +Rails by default automatically loads all fixtures from the +test/fixtures+ folder for your unit and functional test. Loading involves three steps: * Remove any existing data from the table corresponding to the fixture * Load the fixture data into the table @@ -142,7 +142,7 @@ In Rails, unit tests are what you write to test your models. For this guide we will be using Rails _scaffolding_. It will create the model, a migration, controller and views for the new resource in a single operation. It will also create a full test suite following Rails best practices. I will be using examples from this generated code and would be supplementing it with additional examples where necessary. -NOTE: For more information on Rails _scaffolding_, refer to "Getting Started with Rails":getting_started.html +NOTE: For more information on Rails scaffolding, refer to "Getting Started with Rails":getting_started.html When you use +rails generate scaffold+, for a resource among other things it creates a test stub in the +test/unit+ folder: @@ -221,9 +221,9 @@ $ rake db:migrate $ rake db:test:load -Above +rake db:migrate+ runs any pending migrations on the _development_ environment and updates +db/schema.rb+. +rake db:test:load+ recreates the test database from the current db/schema.rb. On subsequent attempts it is a good to first run +db:test:prepare+ as it first checks for pending migrations and warns you appropriately. +Above +rake db:migrate+ runs any pending migrations on the _development_ environment and updates +db/schema.rb+. +rake db:test:load+ recreates the test database from the current +db/schema.rb+. On subsequent attempts it is a good to first run +db:test:prepare+ as it first checks for pending migrations and warns you appropriately. -NOTE: +db:test:prepare+ will fail with an error if db/schema.rb doesn't exists. +NOTE: +db:test:prepare+ will fail with an error if +db/schema.rb+ doesn't exists. h5. Rake Tasks for Preparing your Application for Testing @@ -256,7 +256,7 @@ This will run all the test methods from the test case. You can also run a particular test method from the test case by using the +-n+ switch with the +test method name+. -
+
 $ ruby unit/post_test.rb -n test_truth
 
 Loaded suite unit/post_test
@@ -265,7 +265,7 @@ Started
 Finished in 0.023513 seconds.
 
 1 tests, 1 assertions, 0 failures, 0 errors
-
+ The +.+ (dot) above indicates a passing test. When a test fails you see an +F+; when a test throws an error you see an +E+ in its place. The last line of the output is the summary. @@ -280,7 +280,7 @@ end Let us run this newly added test. -
+
 $ ruby unit/post_test.rb -n test_should_not_save_post_without_title
 Loaded suite -e
 Started
@@ -292,7 +292,7 @@ test_should_not_save_post_without_title(PostTest) [/test/unit/post_test.rb:6]:
  is not true.
 
 1 tests, 1 assertions, 1 failures, 0 errors
-
+ In the output, +F+ denotes a failure. You can see the corresponding trace shown under +1)+ along with the name of the failing test. The next few lines contain the stack trace followed by a message which mentions the actual value and the expected value by the assertion. The default assertion messages provide just enough information to help pinpoint the error. To make the assertion failure message more readable every assertion provides an optional message parameter, as shown here: @@ -305,12 +305,12 @@ end Running this test shows the friendlier assertion message: -
+
   1) Failure:
 test_should_not_save_post_without_title(PostTest) [/test/unit/post_test.rb:6]:
 Saved the post without a title.
  is not true.
-
+ Now to get this test to pass we can add a model level validation for the _title_ field. @@ -322,7 +322,7 @@ end Now the test should pass. Let us verify by running the test again: -
+
 $ ruby unit/post_test.rb -n test_should_not_save_post_without_title
 Loaded suite unit/post_test
 Started
@@ -330,7 +330,7 @@ Started
 Finished in 0.193608 seconds.
 
 1 tests, 1 assertions, 0 failures, 0 errors
-
+ Now if you noticed we first wrote a test which fails for a desired functionality, then we wrote some code which adds the functionality and finally we ensured that our test passes. This approach to software development is referred to as _Test-Driven Development_ (TDD). @@ -348,7 +348,7 @@ end Now you can see even more output in the console from running the tests: -
+
 $ ruby unit/post_test.rb -n test_should_report_error
 Loaded suite -e
 Started
@@ -361,7 +361,7 @@ NameError: undefined local variable or method `some_undefined_variable' for #
+
 
 Notice the 'E' in the output. It denotes a test with error.
 
@@ -446,7 +446,7 @@ test "should get index" do
 end
 
 
-In the +test_should_get_index+ test, Rails simulates a request on the action called index, making sure the request was successful and also ensuring that it assigns a valid +posts+ instance variable.
+In the +test_should_get_index+ test, Rails simulates a request on the action called +index+, making sure the request was successful and also ensuring that it assigns a valid +posts+ instance variable.
 
 The +get+ method kicks off the web request and populates the results into the response. It accepts 4 arguments:
 
-- 
cgit v1.2.3


From ea3fa4e7ffbdb771e06545f22f71bc4e7f6a334c Mon Sep 17 00:00:00 2001
From: Xavier Noria 
Date: Sat, 17 Apr 2010 16:43:31 +0200
Subject: AS guide: AS no longer extends Pathname

---
 railties/guides/source/active_support_core_extensions.textile | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 398d2b2392..32738fe070 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -2662,10 +2662,6 @@ h3. Extensions to +Process+
 
 ...
 
-h3. Extensions to +Pathname+
-
-...
-
 h3. Extensions to +File+
 
 h4. +atomic_write+
-- 
cgit v1.2.3


From 2bae20138a4e3cb37ce26e396a4b14455a947ba2 Mon Sep 17 00:00:00 2001
From: Rohit Arondekar 
Date: Mon, 19 Apr 2010 02:15:04 -0700
Subject: Replaced ',' with 'or' to make it read better.

---
 railties/guides/source/getting_started.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index cbace177f9..58f2eaf178 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -87,7 +87,7 @@ Action View manages the views of your Rails application. It can create both HTML
 
 h5. Action Dispatch
 
-Action Dispatch handles routing of web requests and dispatches them as you want, either to your application, any other Rack application.
+Action Dispatch handles routing of web requests and dispatches them as you want, either to your application or any other Rack application.
 
 h5. Action Mailer
 
-- 
cgit v1.2.3


From 3948ba89e143eeebb8a2a9bd5f370abb66a47377 Mon Sep 17 00:00:00 2001
From: Rohit Arondekar 
Date: Mon, 19 Apr 2010 02:54:50 -0700
Subject: Fixed wrong purpose of _form.html.erb

---
 railties/guides/source/getting_started.textile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index 58f2eaf178..6cc989d156 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -363,7 +363,7 @@ The scaffold generator will build 15 files in your application, along with some
 |app/views/posts/edit.html.erb                |A view to edit an existing post|
 |app/views/posts/show.html.erb                |A view to display a single post|
 |app/views/posts/new.html.erb                 |A view to create a new post|
-|app/views/posts/_form.html.erb               |A view to control the overall look and feel of the other posts views|
+|app/views/posts/_form.html.erb               |A partial to control the overall look and feel of the form used in edit and new views|
 |app/views/layouts/posts.html.erb             |A view to control the overall look and feel of the other posts views|
 |test/functional/posts_controller_test.rb     |Functional testing harness for the posts controller|
 |app/helpers/posts_helper.rb                  |Helper functions to be used from the posts views|
-- 
cgit v1.2.3


From a870c4928cac8bf14ddbda487108bce45bed0fa2 Mon Sep 17 00:00:00 2001
From: Rohit Arondekar 
Date: Mon, 19 Apr 2010 03:12:52 -0700
Subject: Cleaned up the table of files created by scaffolding a Post.

---
 railties/guides/source/getting_started.textile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index 6cc989d156..09190f5800 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -356,7 +356,6 @@ The scaffold generator will build 15 files in your application, along with some
 |_.File                                       |_.Purpose|
 |db/migrate/20100207214725_create_posts.rb.rb    |Migration to create the posts table in your database (your name will include a different timestamp)|
 |app/models/post.rb                           |The Post model|
-|test/unit/post_test.rb                       |Unit testing harness for the posts model|
 |test/fixtures/posts.yml                      |Dummy posts for use in testing|
 |app/controllers/posts_controller.rb          |The Posts controller|
 |app/views/posts/index.html.erb               |A view to display an index of all posts |
@@ -364,11 +363,12 @@ The scaffold generator will build 15 files in your application, along with some
 |app/views/posts/show.html.erb                |A view to display a single post|
 |app/views/posts/new.html.erb                 |A view to create a new post|
 |app/views/posts/_form.html.erb               |A partial to control the overall look and feel of the form used in edit and new views|
-|app/views/layouts/posts.html.erb             |A view to control the overall look and feel of the other posts views|
+|app/views/layouts/posts.html.erb             |A view to control the overall look and feel of the other post views|
+|app/helpers/posts_helper.rb                  |Helper functions to be used from the post views|
+|test/unit/post_test.rb                       |Unit testing harness for the posts model|
 |test/functional/posts_controller_test.rb     |Functional testing harness for the posts controller|
-|app/helpers/posts_helper.rb                  |Helper functions to be used from the posts views|
-|config/routes.rb                             |Edited to include routing information for posts|
 |test/unit/helpers/posts_helper_test.rb       |Unit testing harness for the posts helper|
+|config/routes.rb                             |Edited to include routing information for posts|
 |public/stylesheets/scaffold.css              |Cascading style sheet to make the scaffolded views look better|
 
 h4. Running a Migration
-- 
cgit v1.2.3


From e00c72c9718e518eb99058781f6ee71fa46b38fe Mon Sep 17 00:00:00 2001
From: Cheah Chu Yeow 
Date: Mon, 19 Apr 2010 18:29:18 +0800
Subject: Rails on Rack Rails guide: indicate that Metal pieces now require an
 "X-Cascade" header with a value of "pass" to continue the Metal chain
 execution instead of a HTTP 404 response. Also removed reference to old code.

---
 railties/guides/source/rails_on_rack.textile | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/rails_on_rack.textile b/railties/guides/source/rails_on_rack.textile
index d0d86e99f2..512be43668 100644
--- a/railties/guides/source/rails_on_rack.textile
+++ b/railties/guides/source/rails_on_rack.textile
@@ -247,7 +247,7 @@ class Poller
     if env["PATH_INFO"] =~ /^\/poller/
       [200, {"Content-Type" => "text/html"}, ["Hello, World!"]]
     else
-      [404, {"Content-Type" => "text/html"}, ["Not Found"]]
+      [404, {"Content-Type" => "text/html", "X-Cascade" => "pass"}, ["Not Found"]]
     end
   end
 end
@@ -257,23 +257,13 @@ Metal applications within +app/metal+ folders in plugins will also be discovered
 
 Metal applications are an optimization. You should make sure to "understand the related performance implications":http://weblog.rubyonrails.org/2008/12/20/performance-of-rails-metal before using it.
 
-h4. Execution Order
-
-All Metal Applications are executed by +Rails::Rack::Metal+ middleware, which is a part of the +ActionController::MiddlewareStack+ chain.
+WARNING: To continue the Metal chain execution, return an +X-Cascade+ HTTP header with a value of +pass+.
 
-Here's the primary method responsible for running the Metal applications:
+h4. Execution Order
 
-
-def call(env)
-  @metals.keys.each do |app|
-    result = app.call(env)
-    return result unless result[0].to_i == 404
-  end
-  @app.call(env)
-end
-
+All Metal Applications are executed in alphabetical order of their filenames, so +aaa.rb+ will come before +bbb.rb+ in the metal chain.
 
-In the code above, +@metals+ is an ordered hash of metal applications. Due to the default alphabetical ordering, +aaa.rb+ will come before +bbb.rb+ in the metal chain.
+You can override the default ordering in your environment. Simply add a line like the following to +config/application.rb+
 
 It is, however, possible to override the default ordering in your environment. Simply add a line like the following to +config/environment.rb+
 
@@ -283,8 +273,6 @@ config.metals = ["Bbb", "Aaa"]
 
 Each string in the array should be the name of your metal class. If you do this then be warned that any metal applications not listed will not be loaded.
 
-WARNING: Metal applications cannot return the HTTP Status +404+ to a client, as it is used for continuing the Metal chain execution. Please use normal Rails controllers or a custom middleware if returning +404+ is a requirement.
-
 h3. Resources
 
 h4. Learning Rack
-- 
cgit v1.2.3


From fdf032d673e9952ffe59f60423f53310499e5029 Mon Sep 17 00:00:00 2001
From: Santiago Pastorino 
Date: Mon, 19 Apr 2010 12:30:58 -0300
Subject: rails about is now rake about

---
 railties/guides/source/command_line.textile | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile
index ebae320ebc..873691d13c 100644
--- a/railties/guides/source/command_line.textile
+++ b/railties/guides/source/command_line.textile
@@ -320,21 +320,20 @@ h4. +about+
 Check it: Version numbers for Ruby, RubyGems, Rails, the Rails subcomponents, your application's folder, the current Rails environment name, your app's database adapter, and schema version! +about+ is useful when you need to ask for help, check if a security patch might affect you, or when you need some stats for an existing Rails installation.
 
 
-$ rails about
+$ rake about
 About your application's environment
-Ruby version              1.8.6 (i486-linux)
-RubyGems version          1.3.1
-Rails version             2.2.0
-Active Record version     2.2.0
-Action Pack version       2.2.0
-Active Resource version   2.2.0
-Action Mailer version     2.2.0
-Active Support version    2.2.0
-Edge Rails revision       unknown
-Application root          /home/commandsapp
+Ruby version              1.8.7 (x86_64-linux)
+RubyGems version          1.3.6
+Rack version              1.1
+Rails version             3.0.0
+Active Record version     3.0.0
+Action Pack version       3.0.0
+Active Resource version   3.0.0
+Action Mailer version     3.0.0
+Active Support version    3.0.0
+Middleware                ActionDispatch::Static, Rack::Lock, Rack::Runtime, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::RemoteIp, Rack::Sendfile, ActionDispatch::Callbacks, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, Rack::MethodOverride, ActionDispatch::Head
+Application root          /home/myapp
 Environment               development
-Database adapter          sqlite3
-Database schema version   20081217073400
 
 
 h3. The Rails Advanced Command Line
-- 
cgit v1.2.3


From fa2e70b6e00c72b77b574d291be79caee1a045f0 Mon Sep 17 00:00:00 2001
From: Santiago Pastorino 
Date: Mon, 19 Apr 2010 12:34:42 -0300
Subject: let's talk about the same path

---
 railties/guides/source/command_line.textile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile
index 873691d13c..2a42bcf211 100644
--- a/railties/guides/source/command_line.textile
+++ b/railties/guides/source/command_line.textile
@@ -237,7 +237,7 @@ The migration requires that we *migrate*, that is, run some Ruby code (living in
 
 
 $ rake db:migrate
-(in /Users/mikel/rails_programs/commandsapp)
+(in /home/foobar/commandsapp)
 ==  CreateHighScores: migrating ===============================================
 -- create_table(:high_scores)
    -> 0.0026s
@@ -332,7 +332,7 @@ Active Resource version   3.0.0
 Action Mailer version     3.0.0
 Active Support version    3.0.0
 Middleware                ActionDispatch::Static, Rack::Lock, Rack::Runtime, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::RemoteIp, Rack::Sendfile, ActionDispatch::Callbacks, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, Rack::MethodOverride, ActionDispatch::Head
-Application root          /home/myapp
+Application root          /home/foobar/commandsapp
 Environment               development
 
 
@@ -525,7 +525,7 @@ You can get a list of Rake tasks available to you, which will often depend on yo
 
 
  rake --tasks
-(in /home/developer/commandsapp)
+(in /home/foobar/commandsapp)
 rake db:abort_if_pending_migrations       # Raises an error if there are pending migrations
 rake db:charset                           # Retrieves the charset for the current environment's database
 rake db:collation                         # Retrieves the collation for the current environment's database
-- 
cgit v1.2.3


From e35dcd64bc8604b3de64198226b572433642849b Mon Sep 17 00:00:00 2001
From: Santiago Pastorino 
Date: Mon, 19 Apr 2010 12:35:59 -0300
Subject: Rails 3.0.0 version bootup messages

---
 railties/guides/source/command_line.textile | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile
index 2a42bcf211..ab024d7fc3 100644
--- a/railties/guides/source/command_line.textile
+++ b/railties/guides/source/command_line.textile
@@ -64,12 +64,13 @@ Without any prodding of any kind, +rails server+ will run our new shiny Rails ap
 
 $ cd commandsapp
 $ rails server
-=> Booting WEBrick...
-=> Rails 2.2.0 application started on http://0.0.0.0:3000
-=> Ctrl-C to shutdown server; call with --help for options
-[2008-11-04 10:11:38] INFO  WEBrick 1.3.1
-[2008-11-04 10:11:38] INFO  ruby 1.8.5 (2006-12-04) [i486-linux]
-[2008-11-04 10:11:38] INFO  WEBrick::HTTPServer#start: pid=18994 port=3000
+=> Booting WEBrick
+=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000
+=> Call with -d to detach
+=> Ctrl-C to shutdown server
+[2010-04-18 03:20:33] INFO  WEBrick 1.3.1
+[2010-04-18 03:20:33] INFO  ruby 1.8.7 (2010-01-10) [x86_64-linux]
+[2010-04-18 03:20:33] INFO  WEBrick::HTTPServer#start: pid=26086 port=3000
 
 
 With just three commands we whipped up a Rails server listening on port 3000. Go to your browser and open "http://localhost:3000":http://localhost:3000, you will see a basic rails app running.
-- 
cgit v1.2.3


From 86a43ed8a1123b5fa039651781e05e077df8c637 Mon Sep 17 00:00:00 2001
From: Santiago Pastorino 
Date: Mon, 19 Apr 2010 13:50:59 -0300
Subject: Changed versions to ruby 1.8.7 and Rails 3.0.0

---
 railties/guides/source/performance_testing.textile | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile
index f74b68b0ef..c02fabc0b2 100644
--- a/railties/guides/source/performance_testing.textile
+++ b/railties/guides/source/performance_testing.textile
@@ -246,16 +246,16 @@ Sample output of +BrowsingTest#test_homepage_wall_time.csv+:
 
 
 measurement,created_at,app,rails,ruby,platform
-0.00738224999999992,2009-01-08T03:40:29Z,,2.3.0.master.0744148,ruby-1.8.6.110,i686-darwin9.0.0
-0.00755874999999984,2009-01-08T03:46:18Z,,2.3.0.master.0744148,ruby-1.8.6.110,i686-darwin9.0.0
-0.00762099999999993,2009-01-08T03:49:25Z,,2.3.0.master.0744148,ruby-1.8.6.110,i686-darwin9.0.0
-0.00603075000000008,2009-01-08T04:03:29Z,,2.3.0.master.0744148,ruby-1.8.6.111,i686-darwin9.1.0
-0.00619899999999995,2009-01-08T04:03:53Z,,2.3.0.master.0744148,ruby-1.8.6.111,i686-darwin9.1.0
-0.00755449999999991,2009-01-08T04:04:55Z,,2.3.0.master.0744148,ruby-1.8.6.110,i686-darwin9.0.0
-0.00595999999999997,2009-01-08T04:05:06Z,,2.3.0.master.0744148,ruby-1.8.6.111,i686-darwin9.1.0
-0.00740450000000004,2009-01-09T03:54:47Z,,2.3.0.master.859e150,ruby-1.8.6.110,i686-darwin9.0.0
-0.00603150000000008,2009-01-09T03:54:57Z,,2.3.0.master.859e150,ruby-1.8.6.111,i686-darwin9.1.0
-0.00771250000000012,2009-01-09T15:46:03Z,,2.3.0.master.859e150,ruby-1.8.6.110,i686-darwin9.0.0
+0.00738224999999992,2009-01-08T03:40:29Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00755874999999984,2009-01-08T03:46:18Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00762099999999993,2009-01-08T03:49:25Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00603075000000008,2009-01-08T04:03:29Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00619899999999995,2009-01-08T04:03:53Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00755449999999991,2009-01-08T04:04:55Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00595999999999997,2009-01-08T04:05:06Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00740450000000004,2009-01-09T03:54:47Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00603150000000008,2009-01-09T03:54:57Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
+0.00771250000000012,2009-01-09T15:46:03Z,,3.0.0,ruby-1.8.7.249,x86_64-linux
 
 
 h5(#output-profiling). Profiling
-- 
cgit v1.2.3


From adda7516e91943f940136cbfe0a0a0b89b65fb82 Mon Sep 17 00:00:00 2001
From: Rohit Arondekar 
Date: Tue, 20 Apr 2010 02:07:16 -0700
Subject: minor fix and re-organized description of index action

---
 railties/guides/source/getting_started.textile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index 09190f5800..c33d50d055 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -395,7 +395,7 @@ class CreatePosts < ActiveRecord::Migration
 end
 
 
-The above migration creates two methods, +up+, called when you run this migration into the database, and +down+ in case you need to reverse the changes made by this migration at a later date.  The +up+ command in this case creates a +posts+ table with two string columns and a text column.  It also is creating two timestamp fields to track record creation and updating.  More information about Rails migrations can be found in the "Rails Database Migrations":migrations.html guide.
+The above migration creates two methods, +up+, called when you run this migration into the database, and +down+ in case you need to reverse the changes made by this migration at a later date.  The +up+ command in this case creates a +posts+ table with two string columns and a text column.  It also creates two timestamp fields to track record creation and updating.  More information about Rails migrations can be found in the "Rails Database Migrations":migrations.html guide.
 
 At this point, you can use a rake command to run the migration:
 
@@ -504,7 +504,7 @@ def index
 end
 
 
-This code sets the +@posts+ instance variable to an array of all posts in the database. +Post.all+ calls the +Post+ model to return all of the posts that are currently in the database, with no limiting conditions.
++Post.all+ calls the +Post+ model to return all of the posts currently in the database. The result of this call is an array containing the posts which has been saved in an instance variable called +@posts+.
 
 TIP: For more information on finding records with Active Record, see "Active Record Query Interface":active_record_querying.html.
 
-- 
cgit v1.2.3


From 606bed1a77e0a0a2baf81d1866c66100de443701 Mon Sep 17 00:00:00 2001
From: Rohit Arondekar 
Date: Tue, 20 Apr 2010 23:23:32 -0700
Subject: Replaced f.error_messages with the new code as generated by rails 3
 b3

---
 railties/guides/source/getting_started.textile | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'railties/guides')

diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index c33d50d055..8538d38374 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -603,7 +603,16 @@ If you take a look at +views/posts/_form.html.erb+ file, you will see the follow
 
 
 <%= form_for(@post) do |f| %>
-  <%= f.error_messages %>
+  <% if @post.errors.any? %>
+  
+

<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:

+
    + <% @post.errors.full_messages.each do |msg| %> +
  • <%= msg %>
  • + <% end %> +
+
+ <% end %>
<%= f.label :name %>
-- cgit v1.2.3 From a5955196f2ed8a69c49a1a8c0c617ab91cb8d716 Mon Sep 17 00:00:00 2001 From: Rohit Arondekar Date: Sat, 24 Apr 2010 21:51:25 -0700 Subject: Removed mentions of controller specific layouts. Ticket Ref: http://bit.ly/9dqvBI --- railties/guides/source/getting_started.textile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 8538d38374..6052ac737a 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -363,7 +363,6 @@ The scaffold generator will build 15 files in your application, along with some |app/views/posts/show.html.erb |A view to display a single post| |app/views/posts/new.html.erb |A view to create a new post| |app/views/posts/_form.html.erb |A partial to control the overall look and feel of the form used in edit and new views| -|app/views/layouts/posts.html.erb |A view to control the overall look and feel of the other post views| |app/helpers/posts_helper.rb |Helper functions to be used from the post views| |test/unit/post_test.rb |Unit testing harness for the posts model| |test/functional/posts_controller_test.rb |Functional testing harness for the posts controller| @@ -551,19 +550,19 @@ TIP: For more details on the rendering process, see "Layouts and Rendering in Ra h4. Customizing the Layout -The view is only part of the story of how HTML is displayed in your web browser. Rails also has the concept of +layouts+, which are containers for views. When Rails renders a view to the browser, it does so by putting the view's HTML into a layout's HTML. The +rails generate scaffold+ command automatically created a default layout, +app/views/layouts/posts.html.erb+, for the posts. Open this layout in your editor and modify the +body+ tag: +The view is only part of the story of how HTML is displayed in your web browser. Rails also has the concept of +layouts+, which are containers for views. When Rails renders a view to the browser, it does so by putting the view's HTML into a layout's HTML. In previous versions of Rails, the +rails generate scaffold+ command would automatically create a controller specific layout, like +app/views/layouts/posts.html.erb+, for the posts controller. However this has been changed in Rails 3.0. A application specific +layout+ is used for all the controllers and can be found in +app/views/layouts/application.html.erb+. Open this layout in your editor and modify the +body+ tag: - Posts: <%= controller.action_name %> - <%= stylesheet_link_tag 'scaffold' %> + Blog + <%= stylesheet_link_tag :all %> + <%= javascript_include_tag :defaults %> + <%= csrf_meta_tag %> -

<%= notice %>

- <%= yield %> -- cgit v1.2.3