rails 4.0.0.rc1 → 4.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails might be problematic. Click here for more details.

Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/guides/CHANGELOG.md +9 -2
  3. data/guides/assets/images/{challenge.png → getting_started/challenge.png} +0 -0
  4. data/guides/assets/images/getting_started/rails_welcome.png +0 -0
  5. data/guides/bug_report_templates/active_record_gem.rb +1 -1
  6. data/guides/code/getting_started/Gemfile.lock +1 -1
  7. data/guides/code/getting_started/config/environment.rb +2 -2
  8. data/guides/source/2_2_release_notes.md +1 -1
  9. data/guides/source/2_3_release_notes.md +2 -2
  10. data/guides/source/3_0_release_notes.md +3 -3
  11. data/guides/source/3_1_release_notes.md +1 -1
  12. data/guides/source/3_2_release_notes.md +3 -3
  13. data/guides/source/4_0_release_notes.md +4 -3
  14. data/guides/source/action_controller_overview.md +5 -5
  15. data/guides/source/action_mailer_basics.md +1 -1
  16. data/guides/source/active_record_querying.md +6 -1
  17. data/guides/source/active_record_validations.md +2 -1
  18. data/guides/source/active_support_core_extensions.md +9 -6
  19. data/guides/source/asset_pipeline.md +12 -14
  20. data/guides/source/caching_with_rails.md +2 -2
  21. data/guides/source/command_line.md +1 -1
  22. data/guides/source/configuring.md +1 -1
  23. data/guides/source/contributing_to_ruby_on_rails.md +2 -2
  24. data/guides/source/debugging_rails_applications.md +3 -1
  25. data/guides/source/development_dependencies_install.md +1 -1
  26. data/guides/source/getting_started.md +78 -179
  27. data/guides/source/i18n.md +1 -1
  28. data/guides/source/initialization.md +34 -36
  29. data/guides/source/layout.html.erb +2 -2
  30. data/guides/source/layouts_and_rendering.md +74 -68
  31. data/guides/source/migrations.md +19 -1
  32. data/guides/source/ruby_on_rails_guides_guidelines.md +4 -0
  33. data/guides/source/testing.md +25 -17
  34. data/guides/source/upgrading_ruby_on_rails.md +1 -1
  35. metadata +17 -17
  36. data/guides/assets/images/rails_welcome.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 250f660778b901161649e1697a96c2829472bdb4
4
- data.tar.gz: 1ecf691da54de69d04232a42a5ed814d6da7146e
3
+ metadata.gz: 660352f82958b6b1e06e2e451a046824e8ded59a
4
+ data.tar.gz: 6b104431a32eb8c8282d3e980736a60d6fe60917
5
5
  SHA512:
6
- metadata.gz: 2b47aa456647886a9efb163161ea0f3ed3faba3581c31d01d324dfd0883cc3b7a6705252ea0857a6040d76e2394acffd34533a997fd03eef4c87192d9b9e399e
7
- data.tar.gz: 23b7a83cb7bce1949b177fb2891f25057bb10fde695aaa1b3d2488435b498c206c4876f93de9f009097c11c41de82a4b988c1efd8555a773d20d3754dfc9a96a
6
+ metadata.gz: 357173072a06a2a8b21928122c0d34b0601df602be6d1e718090285af1734b1130338eb60bf5df62f5f54054c1f55e2356f36c2f6f8b3a1374c6e0e7b26a3448
7
+ data.tar.gz: 6de5d91e237332ec6fefe73d00958a5a0c87985c7823ab54ad1e96f98f17e5818cd40172fbfb5ee273d65c2b0ef11a677921b39eda1d586701b77d2c692dcbe5
@@ -1,7 +1,14 @@
1
- ## Rails 4.0.0 (unreleased) ##
1
+ ## Rails 4.0.0.rc2 (June 11, 2013) ##
2
+
3
+ * No changes.
4
+
5
+
6
+ ## Rails 4.0.0.rc1 (April 29, 2013) ##
7
+
2
8
  * Change Service pages(404, etc). *Stanislav Sobolev*
3
9
 
4
- ## Rails 4.0.0.beta1 (unreleased) ##
10
+
11
+ ## Rails 4.0.0.beta1 (February 25, 2013) ##
5
12
 
6
13
  * Split Validations and Callbacks guide into two. *Steve Klabnik*
7
14
 
@@ -1,5 +1,5 @@
1
1
  # Activate the gem you are reporting the issue against.
2
- gem 'activerecord', '3.2.11'
2
+ gem 'activerecord', '3.2.13'
3
3
  require 'active_record'
4
4
  require 'minitest/autorun'
5
5
  require 'logger'
@@ -92,7 +92,7 @@ GEM
92
92
  multi_json (~> 1.0)
93
93
  hike (1.2.1)
94
94
  i18n (0.6.1)
95
- jbuilder (1.0.2)
95
+ jbuilder (1.3.0)
96
96
  activesupport (>= 3.0.0)
97
97
  jquery-rails (2.2.0)
98
98
  railties (>= 3.0, < 5.0)
@@ -1,5 +1,5 @@
1
- # Load the rails application.
1
+ # Load the Rails application.
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
- # Initialize the rails application.
4
+ # Initialize the Rails application.
5
5
  Blog::Application.initialize!
@@ -200,7 +200,7 @@ Active Record association proxies now respect the scope of methods on the proxie
200
200
  * More information:
201
201
  * [Rails 2.2 Change: Private Methods on Association Proxies are Private](http://afreshcup.com/2008/10/24/rails-22-change-private-methods-on-association-proxies-are-private/)
202
202
 
203
- ### Other ActiveRecord Changes
203
+ ### Other Active Record Changes
204
204
 
205
205
  * `rake db:migrate:redo` now accepts an optional VERSION to target that specific migration to redo
206
206
  * Set `config.active_record.timestamped_migrations = false` to have migrations with numeric prefix instead of UTC timestamp.
@@ -134,7 +134,7 @@ Rails 2.3 will introduce the notion of _default scopes_ similar to named scopes,
134
134
 
135
135
  ### Batch Processing
136
136
 
137
- You can now process large numbers of records from an ActiveRecord model with less pressure on memory by using `find_in_batches`:
137
+ You can now process large numbers of records from an Active Record model with less pressure on memory by using `find_in_batches`:
138
138
 
139
139
  ```ruby
140
140
  Customer.find_in_batches(:conditions => {:active => true}) do |customer_group|
@@ -504,7 +504,7 @@ A lot of folks have adopted the notion of using try() to attempt operations on o
504
504
 
505
505
  ### Swappable Parsers for XMLmini
506
506
 
507
- The support for XML parsing in ActiveSupport has been made more flexible by allowing you to swap in different parsers. By default, it uses the standard REXML implementation, but you can easily specify the faster LibXML or Nokogiri implementations for your own applications, provided you have the appropriate gems installed:
507
+ The support for XML parsing in Active Support has been made more flexible by allowing you to swap in different parsers. By default, it uses the standard REXML implementation, but you can easily specify the faster LibXML or Nokogiri implementations for your own applications, provided you have the appropriate gems installed:
508
508
 
509
509
  ```ruby
510
510
  XmlMini.backend = 'LibXML'
@@ -79,7 +79,7 @@ Creating a Rails 3.0 application
79
79
  --------------------------------
80
80
 
81
81
  ```bash
82
- # You should have the 'rails' rubygem installed
82
+ # You should have the 'rails' RubyGem installed
83
83
  $ rails new myapp
84
84
  $ cd myapp
85
85
  ```
@@ -475,7 +475,7 @@ As well as the following deprecations:
475
475
  * `named_scope` in an Active Record class is deprecated and has been renamed to just `scope`.
476
476
  * In `scope` methods, you should move to using the relation methods, instead of a `:conditions => {}` finder method, for example `scope :since, lambda {|time| where("created_at > ?", time) }`.
477
477
  * `save(false)` is deprecated, in favor of `save(:validate => false)`.
478
- * I18n error messages for ActiveRecord should be changed from :en.activerecord.errors.template to `:en.errors.template`.
478
+ * I18n error messages for Active Record should be changed from :en.activerecord.errors.template to `:en.errors.template`.
479
479
  * `model.errors.on` is deprecated in favor of `model.errors[]`
480
480
  * validates_presence_of => validates... :presence => true
481
481
  * `ActiveRecord::Base.colorize_logging` and `config.active_record.colorize_logging` are deprecated in favor of `Rails::LogSubscriber.colorize_logging` or `config.colorize_logging`
@@ -580,7 +580,7 @@ Action Mailer has been given a new API with TMail being replaced out with the ne
580
580
 
581
581
  * All mailers are now in `app/mailers` by default.
582
582
  * Can now send email using new API with three methods: `attachments`, `headers` and `mail`.
583
- * ActionMailer now has native support for inline attachments using the `attachments.inline` method.
583
+ * Action Mailer now has native support for inline attachments using the `attachments.inline` method.
584
584
  * Action Mailer emailing methods now return `Mail::Message` objects, which can then be sent the `deliver` message to send itself.
585
585
  * All delivery methods are now abstracted out to the Mail gem.
586
586
  * The mail delivery method can accept a hash of all valid mail header fields with their value pair.
@@ -137,7 +137,7 @@ Creating a Rails 3.1 application
137
137
  --------------------------------
138
138
 
139
139
  ```bash
140
- # You should have the 'rails' rubygem installed
140
+ # You should have the 'rails' RubyGem installed
141
141
  $ rails new myapp
142
142
  $ cd myapp
143
143
  ```
@@ -67,7 +67,7 @@ Creating a Rails 3.2 application
67
67
  --------------------------------
68
68
 
69
69
  ```bash
70
- # You should have the 'rails' rubygem installed
70
+ # You should have the 'rails' RubyGem installed
71
71
  $ rails new myapp
72
72
  $ cd myapp
73
73
  ```
@@ -101,7 +101,7 @@ Rails 3.2 comes with a development mode that's noticeably faster. Inspired by [A
101
101
 
102
102
  ### Automatic Query Explains
103
103
 
104
- Rails 3.2 comes with a nice feature that explains queries generated by ARel by defining an `explain` method in `ActiveRecord::Relation`. For example, you can run something like `puts Person.active.limit(5).explain` and the query ARel produces is explained. This allows to check for the proper indexes and further optimizations.
104
+ Rails 3.2 comes with a nice feature that explains queries generated by Arel by defining an `explain` method in `ActiveRecord::Relation`. For example, you can run something like `puts Person.active.limit(5).explain` and the query Arel produces is explained. This allows to check for the proper indexes and further optimizations.
105
105
 
106
106
  Queries that take more than half a second to run are *automatically* explained in the development mode. This threshold, of course, can be changed.
107
107
 
@@ -189,7 +189,7 @@ Action Pack
189
189
 
190
190
  * form\_for is changed to use "#{action}\_#{as}" as the css class and id if `:as` option is provided. Earlier versions used "#{as}\_#{action}".
191
191
 
192
- * `ActionController::ParamsWrapper` on ActiveRecord models now only wrap `attr_accessible` attributes if they were set. If not, only the attributes returned by the class method `attribute_names` will be wrapped. This fixes the wrapping of nested attributes by adding them to `attr_accessible`.
192
+ * `ActionController::ParamsWrapper` on Active Record models now only wrap `attr_accessible` attributes if they were set. If not, only the attributes returned by the class method `attribute_names` will be wrapped. This fixes the wrapping of nested attributes by adding them to `attr_accessible`.
193
193
 
194
194
  * Log "Filter chain halted as CALLBACKNAME rendered or redirected" every time a before callback halts.
195
195
 
@@ -22,7 +22,7 @@ Creating a Rails 4.0 application
22
22
  --------------------------------
23
23
 
24
24
  ```
25
- You should have the 'rails' rubygem installed
25
+ You should have the 'rails' RubyGem installed
26
26
  $ rails new myapp
27
27
  $ cd myapp
28
28
  ```
@@ -113,7 +113,8 @@ Please refer to the [Changelog](https://github.com/rails/rails/blob/master/activ
113
113
 
114
114
  * Add `ActiveModel::ForbiddenAttributesProtection`, a simple module to protect attributes from mass assignment when non-permitted attributes are passed.
115
115
 
116
- * Added `ActiveModel::Model`, a mixin to make Ruby objects work with ActionPack out of box.
116
+ * Added `ActiveModel::Model`, a mixin to make Ruby objects work with
117
+ Action Pack out of box.
117
118
 
118
119
  ### Deprecations
119
120
 
@@ -142,7 +143,7 @@ Please refer to the [Changelog](https://github.com/rails/rails/blob/master/activ
142
143
 
143
144
  * Deprecates the compatibility method Module#local_constant_names, use Module#local_constants instead (which returns symbols).
144
145
 
145
- * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger from Ruby stdlib.
146
+ * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger from Ruby standard library.
146
147
 
147
148
  * Deprecate `assert_present` and `assert_blank` in favor of `assert object.blank?` and `assert object.present?`
148
149
 
@@ -148,7 +148,7 @@ Also, if you've turned on `config.wrap_parameters` in your initializer or callin
148
148
  And assume that you're sending the data to `CompaniesController`, it would then be wrapped in `:company` key like this:
149
149
 
150
150
  ```ruby
151
- { :name => "acme", :address => "123 Carrot Street", :company => { :name => "acme", :address => "123 Carrot Street" } }
151
+ { name: "acme", address: "123 Carrot Street", company: { name: "acme", address: "123 Carrot Street" } }
152
152
  ```
153
153
 
154
154
  You can customize the name of the key or specific parameters you want to wrap by consulting the [API documentation](http://api.rubyonrails.org/classes/ActionController/ParamsWrapper.html)
@@ -246,7 +246,7 @@ To declare that the value in `params` must be an array of permitted
246
246
  scalar values map the key to an empty array:
247
247
 
248
248
  ```ruby
249
- params.permit(:id => [])
249
+ params.permit(id: [])
250
250
  ```
251
251
 
252
252
  To whitelist an entire hash of parameters, the `permit!` method can be
@@ -266,9 +266,9 @@ mass-assigned.
266
266
  You can also use permit on nested parameters, like:
267
267
 
268
268
  ```ruby
269
- params.permit(:name, {:emails => []},
270
- :friends => [ :name,
271
- { :family => [ :name ], :hobbies => [] }])
269
+ params.permit(:name, { emails: [] },
270
+ friends: [ :name,
271
+ { family: [ :name ], hobbies: [] }])
272
272
  ```
273
273
 
274
274
  This declaration whitelists the `name`, `emails` and `friends`
@@ -1,7 +1,7 @@
1
1
  Action Mailer Basics
2
2
  ====================
3
3
 
4
- This guide should provide you with all you need to get started in sending and
4
+ This guide provides you with all you need to get started in sending and
5
5
  receiving emails from and to your application, and many internals of Action
6
6
  Mailer. It also covers how to test your mailers.
7
7
 
@@ -707,7 +707,7 @@ Post.order('id DESC').limit(20).unscope(:order, :limit) = Post.all
707
707
  You can additionally unscope specific where clauses. For example:
708
708
 
709
709
  ```ruby
710
- Post.where(:id => 10).limit(1).unscope(:where => :id, :limit).order('id DESC') = Post.order('id DESC')
710
+ Post.where(:id => 10).limit(1).unscope(where: :id, :limit).order('id DESC') = Post.order('id DESC')
711
711
  ```
712
712
 
713
713
  ### `only`
@@ -1301,6 +1301,11 @@ Client.unscoped {
1301
1301
  Dynamic Finders
1302
1302
  ---------------
1303
1303
 
1304
+ NOTE: Dynamic finders have been deprecated in Rails 4.0 and will be
1305
+ removed in Rails 4.1. The best practice is to use Active Record scopes
1306
+ instead. You can find the deprecation gem at
1307
+ https://github.com/rails/activerecord-deprecated_finders
1308
+
1304
1309
  For every field (also known as an attribute) you define in your table, Active Record provides a finder method. If you have a field called `first_name` on your `Client` model for example, you get `find_by_first_name` for free from Active Record. If you have a `locked` field on the `Client` model, you also get `find_by_locked` and methods.
1305
1310
 
1306
1311
  You can specify an exclamation point (`!`) on the end of the dynamic finders to get them to raise an `ActiveRecord::RecordNotFound` error if they do not return any records, like `Client.find_by_name!("Ryan")`
@@ -434,7 +434,7 @@ end
434
434
 
435
435
  Note that the default error messages are plural (e.g., "is too short (minimum
436
436
  is %{count} characters)"). For this reason, when `:minimum` is 1 you should
437
- provide a personalized message or use `validates_presence_of` instead. When
437
+ provide a personalized message or use `presence: true` instead. When
438
438
  `:in` or `:within` have a lower limit of 1, you should either provide a
439
439
  personalized message or call `presence` prior to `length`.
440
440
 
@@ -768,6 +768,7 @@ class Person < ActiveRecord::Base
768
768
  validates :name, presence: true, on: :save
769
769
  end
770
770
  ```
771
+ The last line is in review state and as of now, it is not running in any version of Rails 3.2.x as discussed in this [issue](https://github.com/rails/rails/issues/10248)
771
772
 
772
773
  Strict Validations
773
774
  ------------------
@@ -10,7 +10,7 @@ After reading this guide, you will know:
10
10
  * What Core Extensions are.
11
11
  * How to load all extensions.
12
12
  * How to cherry-pick just the extensions you want.
13
- * What extensions ActiveSupport provides.
13
+ * What extensions Active Support provides.
14
14
 
15
15
  --------------------------------------------------------------------------------
16
16
 
@@ -476,12 +476,11 @@ NOTE: Defined in `active_support/core_ext/kernel/reporting.rb`.
476
476
 
477
477
  ### `in?`
478
478
 
479
- The predicate `in?` tests if an object is included in another object or a list of objects. An `ArgumentError` exception will be raised if a single argument is passed and it does not respond to `include?`.
479
+ The predicate `in?` tests if an object is included in another object. An `ArgumentError` exception will be raised if the argument passed does not respond to `include?`.
480
480
 
481
481
  Examples of `in?`:
482
482
 
483
483
  ```ruby
484
- 1.in?(1,2) # => true
485
484
  1.in?([1,2]) # => true
486
485
  "lo".in?("hello") # => true
487
486
  25.in?(30..50) # => false
@@ -2216,7 +2215,9 @@ NOTE: Defined in `active_support/core_ext/array/conversions.rb`.
2216
2215
 
2217
2216
  The method `to_formatted_s` acts like `to_s` by default.
2218
2217
 
2219
- If the array contains items that respond to `id`, however, it may be passed the symbol `:db` as argument. That's typically used with collections of ARs. Returned strings are:
2218
+ If the array contains items that respond to `id`, however, the symbol
2219
+ `:db` may be passed as argument. That's typically used with
2220
+ collections of Active Record objects. Returned strings are:
2220
2221
 
2221
2222
  ```ruby
2222
2223
  [].to_formatted_s(:db) # => "null"
@@ -2372,7 +2373,8 @@ NOTE: Defined in `active_support/core_ext/array/wrap.rb`.
2372
2373
 
2373
2374
  ### Duplicating
2374
2375
 
2375
- The method `Array.deep_dup` duplicates itself and all objects inside recursively with ActiveSupport method `Object#deep_dup`. It works like `Array#map` with sending `deep_dup` method to each object inside.
2376
+ The method `Array.deep_dup` duplicates itself and all objects inside
2377
+ recursively with Active Support method `Object#deep_dup`. It works like `Array#map` with sending `deep_dup` method to each object inside.
2376
2378
 
2377
2379
  ```ruby
2378
2380
  array = [1, [2, 3]]
@@ -2593,7 +2595,8 @@ NOTE: Defined in `active_support/core_ext/hash/deep_merge.rb`.
2593
2595
 
2594
2596
  ### Deep duplicating
2595
2597
 
2596
- The method `Hash.deep_dup` duplicates itself and all keys and values inside recursively with ActiveSupport method `Object#deep_dup`. It works like `Enumerator#each_with_object` with sending `deep_dup` method to each pair inside.
2598
+ The method `Hash.deep_dup` duplicates itself and all keys and values
2599
+ inside recursively with Active Support method `Object#deep_dup`. It works like `Enumerator#each_with_object` with sending `deep_dup` method to each pair inside.
2597
2600
 
2598
2601
  ```ruby
2599
2602
  hash = { a: 1, b: { c: 2, d: [3, 4] } }
@@ -75,7 +75,7 @@ The query string strategy has several disadvantages:
75
75
  2. **The file name can change between nodes in multi-server environments.**<br />
76
76
  The default query string in Rails 2.x is based on the modification time of the files. When assets are deployed to a cluster, there is no guarantee that the timestamps will be the same, resulting in different values being used depending on which server handles the request.
77
77
  3. **Too much cache invalidation**<br />
78
- When static assets are deployed with each new release of code, the mtime of _all_ these files changes, forcing all remote clients to fetch them again, even when the content of those assets has not changed.
78
+ When static assets are deployed with each new release of code, the mtime(time of last modification) of _all_ these files changes, forcing all remote clients to fetch them again, even when the content of those assets has not changed.
79
79
 
80
80
  Fingerprinting fixes these problems by avoiding query strings, and by ensuring that filenames are consistent based on their content.
81
81
 
@@ -416,7 +416,7 @@ You can call this task on the server during deployment to create compiled versio
416
416
  The rake task is:
417
417
 
418
418
  ```bash
419
- $ bundle exec rake assets:precompile
419
+ $ RAILS_ENV=production bundle exec rake assets:precompile
420
420
  ```
421
421
 
422
422
  For faster asset precompiles, you can partially load your application by setting
@@ -450,7 +450,7 @@ The default matcher for compiling files includes `application.js`, `application.
450
450
 
451
451
  NOTE. The matcher (and other members of the precompile array; see below) is applied to final compiled file names. This means that anything that compiles to JS/CSS is excluded, as well as raw JS/CSS files; for example, `.coffee` and `.scss` files are **not** automatically included as they compile to JS/CSS.
452
452
 
453
- If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the `precompile` array:
453
+ If you have other manifests or individual stylesheets and JavaScript files to include, you can add them to the `precompile` array in `config/application.rb`:
454
454
 
455
455
  ```ruby
456
456
  config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js']
@@ -459,7 +459,7 @@ config.assets.precompile += ['admin.js', 'admin.css', 'swfObject.js']
459
459
  Or you can opt to precompile all assets with something like this:
460
460
 
461
461
  ```ruby
462
- # config/environments/production.rb
462
+ # config/application.rb
463
463
  config.assets.precompile << Proc.new do |path|
464
464
  if path =~ /\.(css|js)\z/
465
465
  full_path = Rails.application.assets.resolve(path).to_path
@@ -707,7 +707,7 @@ config.assets.cache_store = :memory_store
707
707
  The options accepted by the assets cache store are the same as the application's cache store.
708
708
 
709
709
  ```ruby
710
- config.assets.cache_store = :memory_store, { :size => 32.megabytes }
710
+ config.assets.cache_store = :memory_store, { size: 32.megabytes }
711
711
  ```
712
712
 
713
713
  Adding Assets to Your Gems
@@ -815,18 +815,16 @@ end
815
815
  If you use the `assets` group with Bundler, please make sure that your `config/application.rb` has the following Bundler require statement:
816
816
 
817
817
  ```ruby
818
- if defined?(Bundler)
819
- # If you precompile assets before deploying to production, use this line
820
- Bundler.require *Rails.groups(:assets => %w(development test))
821
- # If you want your assets lazily compiled in production, use this line
822
- # Bundler.require(:default, :assets, Rails.env)
823
- end
818
+ # If you precompile assets before deploying to production, use this line
819
+ Bundler.require *Rails.groups(:assets => %w(development test))
820
+ # If you want your assets lazily compiled in production, use this line
821
+ # Bundler.require(:default, :assets, Rails.env)
824
822
  ```
825
823
 
826
- Instead of the old Rails 3.0 version:
824
+ Instead of the generated version:
827
825
 
828
826
  ```ruby
829
- # If you have a Gemfile, require the gems listed there, including any gems
827
+ # Require the gems listed in Gemfile, including any gems
830
828
  # you've limited to :test, :development, or :production.
831
- Bundler.require(:default, Rails.env) if defined?(Bundler)
829
+ Bundler.require(:default, Rails.env)
832
830
  ```
@@ -30,13 +30,13 @@ config.action_controller.perform_caching = true
30
30
 
31
31
  Page caching is a Rails mechanism which allows the request for a generated page to be fulfilled by the webserver (i.e. Apache or nginx), without ever having to go through the Rails stack at all. Obviously, this is super-fast. Unfortunately, it can't be applied to every situation (such as pages that need authentication) and since the webserver is literally just serving a file from the filesystem, cache expiration is an issue that needs to be dealt with.
32
32
 
33
- INFO: Page Caching has been removed from Rails 4. See the [actionpack-page_caching gem](https://github.com/rails/actionpack-page_caching)
33
+ INFO: Page Caching has been removed from Rails 4. See the [actionpack-page_caching gem](https://github.com/rails/actionpack-page_caching). See [DHH's key-based cache expiration overview](http://37signals.com/svn/posts/3113-how-key-based-cache-expiration-works) for the newly-preferred method.
34
34
 
35
35
  ### Action Caching
36
36
 
37
37
  Page Caching cannot be used for actions that have before filters - for example, pages that require authentication. This is where Action Caching comes in. Action Caching works like Page Caching except the incoming web request hits the Rails stack so that before filters can be run on it before the cache is served. This allows authentication and other restrictions to be run while still serving the result of the output from a cached copy.
38
38
 
39
- INFO: Action Caching has been removed from Rails 4. See the [actionpack-action_caching gem](https://github.com/rails/actionpack-action_caching)
39
+ INFO: Action Caching has been removed from Rails 4. See the [actionpack-action_caching gem](https://github.com/rails/actionpack-action_caching). See [DHH's key-based cache expiration overview](http://37signals.com/svn/posts/3113-how-key-based-cache-expiration-works) for the newly-preferred method.
40
40
 
41
41
  ### Fragment Caching
42
42
 
@@ -201,7 +201,7 @@ Usage:
201
201
 
202
202
  ...
203
203
 
204
- ActiveRecord options:
204
+ Active Record options:
205
205
  [--migration] # Indicates when to generate migration
206
206
  # Default: true
207
207
 
@@ -729,7 +729,7 @@ development:
729
729
  timeout: 5000
730
730
  ```
731
731
 
732
- Since the connection pooling is handled inside of ActiveRecord by default, all application servers (Thin, mongrel, Unicorn etc.) should behave the same. Initially, the database connection pool is empty and it will create additional connections as the demand for them increases, until it reaches the connection pool limit.
732
+ Since the connection pooling is handled inside of Active Record by default, all application servers (Thin, mongrel, Unicorn etc.) should behave the same. Initially, the database connection pool is empty and it will create additional connections as the demand for them increases, until it reaches the connection pool limit.
733
733
 
734
734
  Any one request will check out a connection the first time it requires access to the database, after which it will check the connection back in, at the end of the request, meaning that the additional connection slot will be available again for the next request in the queue.
735
735
 
@@ -182,9 +182,9 @@ Contributing to the Rails Documentation
182
182
 
183
183
  Ruby on Rails has two main sets of documentation: the guides help you in learning about Ruby on Rails, and the API is a reference.
184
184
 
185
- You can help improve the Rails guides by making them more coherent, consistent or readable, adding missing information, correcting factual errors, fixing typos, or bringing it up to date with the latest edge Rails. To get involved in the translation of Rails guides, please see [Translating Rails Guides](https://wiki.github.com/lifo/docrails/translating-rails-guides).
185
+ You can help improve the Rails guides by making them more coherent, consistent or readable, adding missing information, correcting factual errors, fixing typos, or bringing it up to date with the latest edge Rails. To get involved in the translation of Rails guides, please see [Translating Rails Guides](https://wiki.github.com/rails/docrails/translating-rails-guides).
186
186
 
187
- If you're confident about your changes, you can push them directly yourself via [docrails](https://github.com/lifo/docrails). Docrails is a branch with an **open commit policy** and public write access. Commits to docrails are still reviewed, but this happens after they are pushed. Docrails is merged with master regularly, so you are effectively editing the Ruby on Rails documentation.
187
+ If you're confident about your changes, you can push them directly yourself via [docrails](https://github.com/rails/docrails). Docrails is a branch with an **open commit policy** and public write access. Commits to docrails are still reviewed, but this happens after they are pushed. Docrails is merged with master regularly, so you are effectively editing the Ruby on Rails documentation.
188
188
 
189
189
  If you are unsure of the documentation changes, you can create an issue in the [Rails](https://github.com/rails/rails/issues) issues tracker on GitHub.
190
190
 
@@ -198,7 +198,9 @@ Adding extra logging like this makes it easy to search for unexpected or unusual
198
198
 
199
199
  ### Tagged Logging
200
200
 
201
- When running multi-user, multi-account applications, it’s often useful to be able to filter the logs using some custom rules. `TaggedLogging` in ActiveSupport helps in doing exactly that by stamping log lines with subdomains, request ids, and anything else to aid debugging such applications.
201
+ When running multi-user, multi-account applications, it’s often useful
202
+ to be able to filter the logs using some custom rules. `TaggedLogging`
203
+ in Active Support helps in doing exactly that by stamping log lines with subdomains, request ids, and anything else to aid debugging such applications.
202
204
 
203
205
  ```ruby
204
206
  logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
@@ -24,7 +24,7 @@ Ruby on Rails uses Git for source code control. The [Git homepage](http://git-sc
24
24
  * [Try Git course](http://try.github.io/) is an interactive course that will teach you the basics.
25
25
  * The [official Documentation](http://git-scm.com/documentation) is pretty comprehensive and also contains some videos with the basics of Git
26
26
  * [Everyday Git](http://schacon.github.io/git/everyday.html) will teach you just enough about Git to get by.
27
- * The [PeepCode screencast](https://peepcode.com/products/git) on Git ($9) is easier to follow.
27
+ * The [PeepCode screencast](https://peepcode.com/products/git) on Git is easier to follow.
28
28
  * [GitHub](http://help.github.com) offers links to a variety of Git resources.
29
29
  * [Pro Git](http://git-scm.com/book) is an entire book about Git with a Creative Commons license.
30
30