rails 4.1.16 → 4.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/guides/CHANGELOG.md +13 -102
  4. data/guides/Rakefile +2 -2
  5. data/guides/assets/javascripts/guides.js +6 -0
  6. data/guides/assets/stylesheets/main.css +4 -1
  7. data/guides/bug_report_templates/action_controller_gem.rb +2 -2
  8. data/guides/bug_report_templates/action_controller_master.rb +5 -2
  9. data/guides/bug_report_templates/active_record_master.rb +2 -0
  10. data/guides/rails_guides.rb +2 -2
  11. data/guides/rails_guides/helpers.rb +1 -1
  12. data/guides/rails_guides/levenshtein.rb +29 -21
  13. data/guides/rails_guides/markdown.rb +6 -7
  14. data/guides/rails_guides/markdown/renderer.rb +1 -1
  15. data/guides/source/2_3_release_notes.md +3 -3
  16. data/guides/source/3_0_release_notes.md +4 -4
  17. data/guides/source/3_1_release_notes.md +2 -2
  18. data/guides/source/3_2_release_notes.md +2 -2
  19. data/guides/source/4_1_release_notes.md +8 -9
  20. data/guides/source/4_2_release_notes.md +572 -0
  21. data/guides/source/_license.html.erb +1 -1
  22. data/guides/source/_welcome.html.erb +2 -8
  23. data/guides/source/action_controller_overview.md +79 -7
  24. data/guides/source/action_mailer_basics.md +36 -11
  25. data/guides/source/action_view_overview.md +138 -119
  26. data/guides/source/active_job_basics.md +253 -0
  27. data/guides/source/active_model_basics.md +23 -0
  28. data/guides/source/active_record_basics.md +16 -15
  29. data/guides/source/active_record_callbacks.md +12 -9
  30. data/guides/source/{migrations.md → active_record_migrations.md} +90 -217
  31. data/guides/source/active_record_postgresql.md +437 -0
  32. data/guides/source/active_record_querying.md +261 -261
  33. data/guides/source/active_record_validations.md +7 -7
  34. data/guides/source/active_support_core_extensions.md +105 -44
  35. data/guides/source/active_support_instrumentation.md +3 -2
  36. data/guides/source/api_documentation_guidelines.md +62 -16
  37. data/guides/source/asset_pipeline.md +58 -46
  38. data/guides/source/association_basics.md +47 -38
  39. data/guides/source/caching_with_rails.md +31 -6
  40. data/guides/source/command_line.md +56 -25
  41. data/guides/source/configuring.md +98 -19
  42. data/guides/source/contributing_to_ruby_on_rails.md +174 -111
  43. data/guides/source/credits.html.erb +1 -1
  44. data/guides/source/debugging_rails_applications.md +438 -284
  45. data/guides/source/development_dependencies_install.md +17 -4
  46. data/guides/source/documents.yaml +11 -7
  47. data/guides/source/engines.md +192 -203
  48. data/guides/source/form_helpers.md +54 -45
  49. data/guides/source/generators.md +20 -11
  50. data/guides/source/getting_started.md +330 -191
  51. data/guides/source/i18n.md +92 -62
  52. data/guides/source/index.html.erb +1 -0
  53. data/guides/source/initialization.md +108 -59
  54. data/guides/source/layout.html.erb +1 -4
  55. data/guides/source/layouts_and_rendering.md +24 -23
  56. data/guides/source/nested_model_forms.md +3 -3
  57. data/guides/source/plugins.md +26 -26
  58. data/guides/source/rails_application_templates.md +21 -3
  59. data/guides/source/rails_on_rack.md +1 -1
  60. data/guides/source/routing.md +97 -71
  61. data/guides/source/ruby_on_rails_guides_guidelines.md +10 -12
  62. data/guides/source/security.md +39 -33
  63. data/guides/source/testing.md +111 -108
  64. data/guides/source/upgrading_ruby_on_rails.md +131 -14
  65. data/guides/source/working_with_javascript_in_rails.md +18 -16
  66. data/guides/w3c_validator.rb +2 -0
  67. metadata +37 -94
  68. data/guides/bug_report_templates/generic_gem.rb +0 -15
  69. data/guides/bug_report_templates/generic_master.rb +0 -26
  70. data/guides/code/getting_started/Gemfile +0 -40
  71. data/guides/code/getting_started/Gemfile.lock +0 -125
  72. data/guides/code/getting_started/README.rdoc +0 -28
  73. data/guides/code/getting_started/Rakefile +0 -6
  74. data/guides/code/getting_started/app/assets/javascripts/application.js +0 -15
  75. data/guides/code/getting_started/app/assets/javascripts/comments.js.coffee +0 -3
  76. data/guides/code/getting_started/app/assets/javascripts/posts.js.coffee +0 -3
  77. data/guides/code/getting_started/app/assets/javascripts/welcome.js.coffee +0 -3
  78. data/guides/code/getting_started/app/assets/stylesheets/application.css +0 -13
  79. data/guides/code/getting_started/app/assets/stylesheets/comments.css.scss +0 -3
  80. data/guides/code/getting_started/app/assets/stylesheets/posts.css.scss +0 -3
  81. data/guides/code/getting_started/app/assets/stylesheets/welcome.css.scss +0 -3
  82. data/guides/code/getting_started/app/controllers/application_controller.rb +0 -5
  83. data/guides/code/getting_started/app/controllers/comments_controller.rb +0 -23
  84. data/guides/code/getting_started/app/controllers/posts_controller.rb +0 -53
  85. data/guides/code/getting_started/app/controllers/welcome_controller.rb +0 -4
  86. data/guides/code/getting_started/app/helpers/application_helper.rb +0 -2
  87. data/guides/code/getting_started/app/helpers/comments_helper.rb +0 -2
  88. data/guides/code/getting_started/app/helpers/posts_helper.rb +0 -2
  89. data/guides/code/getting_started/app/helpers/welcome_helper.rb +0 -2
  90. data/guides/code/getting_started/app/models/comment.rb +0 -3
  91. data/guides/code/getting_started/app/models/post.rb +0 -7
  92. data/guides/code/getting_started/app/views/comments/_comment.html.erb +0 -15
  93. data/guides/code/getting_started/app/views/comments/_form.html.erb +0 -13
  94. data/guides/code/getting_started/app/views/layouts/application.html.erb +0 -14
  95. data/guides/code/getting_started/app/views/posts/_form.html.erb +0 -27
  96. data/guides/code/getting_started/app/views/posts/edit.html.erb +0 -5
  97. data/guides/code/getting_started/app/views/posts/index.html.erb +0 -21
  98. data/guides/code/getting_started/app/views/posts/new.html.erb +0 -5
  99. data/guides/code/getting_started/app/views/posts/show.html.erb +0 -18
  100. data/guides/code/getting_started/app/views/welcome/index.html.erb +0 -4
  101. data/guides/code/getting_started/bin/bundle +0 -4
  102. data/guides/code/getting_started/bin/rails +0 -4
  103. data/guides/code/getting_started/bin/rake +0 -4
  104. data/guides/code/getting_started/config.ru +0 -4
  105. data/guides/code/getting_started/config/application.rb +0 -18
  106. data/guides/code/getting_started/config/boot.rb +0 -4
  107. data/guides/code/getting_started/config/database.yml +0 -25
  108. data/guides/code/getting_started/config/environment.rb +0 -5
  109. data/guides/code/getting_started/config/environments/development.rb +0 -30
  110. data/guides/code/getting_started/config/environments/production.rb +0 -80
  111. data/guides/code/getting_started/config/environments/test.rb +0 -36
  112. data/guides/code/getting_started/config/initializers/backtrace_silencers.rb +0 -7
  113. data/guides/code/getting_started/config/initializers/filter_parameter_logging.rb +0 -4
  114. data/guides/code/getting_started/config/initializers/inflections.rb +0 -16
  115. data/guides/code/getting_started/config/initializers/locale.rb +0 -9
  116. data/guides/code/getting_started/config/initializers/mime_types.rb +0 -5
  117. data/guides/code/getting_started/config/initializers/secret_token.rb +0 -12
  118. data/guides/code/getting_started/config/initializers/session_store.rb +0 -3
  119. data/guides/code/getting_started/config/initializers/wrap_parameters.rb +0 -14
  120. data/guides/code/getting_started/config/locales/en.yml +0 -23
  121. data/guides/code/getting_started/config/routes.rb +0 -7
  122. data/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb +0 -10
  123. data/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb +0 -11
  124. data/guides/code/getting_started/db/schema.rb +0 -33
  125. data/guides/code/getting_started/db/seeds.rb +0 -7
  126. data/guides/code/getting_started/public/404.html +0 -60
  127. data/guides/code/getting_started/public/422.html +0 -60
  128. data/guides/code/getting_started/public/500.html +0 -59
  129. data/guides/code/getting_started/public/favicon.ico +0 -0
  130. data/guides/code/getting_started/public/robots.txt +0 -5
  131. data/guides/code/getting_started/test/controllers/comments_controller_test.rb +0 -7
  132. data/guides/code/getting_started/test/controllers/posts_controller_test.rb +0 -7
  133. data/guides/code/getting_started/test/controllers/welcome_controller_test.rb +0 -9
  134. data/guides/code/getting_started/test/fixtures/comments.yml +0 -11
  135. data/guides/code/getting_started/test/fixtures/posts.yml +0 -9
  136. data/guides/code/getting_started/test/helpers/comments_helper_test.rb +0 -4
  137. data/guides/code/getting_started/test/helpers/posts_helper_test.rb +0 -4
  138. data/guides/code/getting_started/test/helpers/welcome_helper_test.rb +0 -4
  139. data/guides/code/getting_started/test/models/comment_test.rb +0 -7
  140. data/guides/code/getting_started/test/models/post_test.rb +0 -7
  141. data/guides/code/getting_started/test/test_helper.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a161623794a4621a5a9494ab5a7276dc31396e7d
4
- data.tar.gz: d37862afe12df5f3a83f7403f0dc8f5f4ed88802
3
+ metadata.gz: c417d25c9104b8bd76f1fb1a78d4fe7f8dcb42a6
4
+ data.tar.gz: db8ef2ff70c6cb7e1f45b910548f381c3dc947fc
5
5
  SHA512:
6
- metadata.gz: 783193071931a97f089e46b314eaaba449563cc341a4426f3d191adcccf023395319dd07c7c0138aee9da9e3c6c5591069b3dc40df05ed08b7b32e0aed09b3aa
7
- data.tar.gz: a002c2cb1f7b9fd555674ccb759e2ef62e5645bec0a0e57d6fdf2c25a2a19046131cec5723264f8bc5f6a2abe18103bc7bbec79c9444e90cf10d135382c0cf26
6
+ metadata.gz: 9f1595348d43495eddc98d230dd2317f9faa7a3d92427071cd24c4a4d4762396a7befc43c644ea66858a0d3530662dff694a5c0e24a7aa95a8119768135edce1
7
+ data.tar.gz: 9dd0e2984e94aececf6b4da15f438f421374d05c5082750111cfa99f2c1c94af6935f3b86613fcf7b770127e1477345e49b8bfbd3dfd7adf0ce6472a4e508e28
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Rails is a web-application framework that includes everything needed to
4
4
  create database-backed web applications according to the
5
- [Model-View-Controller (MVC)](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)
5
+ [Model-View-Controller (MVC)](http://en.wikipedia.org/wiki/Model-view-controller)
6
6
  pattern.
7
7
 
8
8
  Understanding the MVC pattern is key to understanding Rails. MVC divides your
@@ -67,7 +67,7 @@ independently outside Rails.
67
67
  * [Getting Started with Rails](http://guides.rubyonrails.org/getting_started.html)
68
68
  * [Ruby on Rails Guides](http://guides.rubyonrails.org)
69
69
  * [The API Documentation](http://api.rubyonrails.org)
70
- * [Ruby on Rails Tutorial](http://ruby.railstutorial.org/ruby-on-rails-tutorial-book)
70
+ * [Ruby on Rails Tutorial](http://www.railstutorial.org/book)
71
71
 
72
72
  ## Contributing
73
73
 
@@ -76,7 +76,7 @@ We encourage you to contribute to Ruby on Rails! Please check out the
76
76
 
77
77
  ## Code Status
78
78
 
79
- * [![Build Status](https://travis-ci.org/rails/rails.png?branch=master)](https://travis-ci.org/rails/rails)
79
+ * [![Build Status](https://travis-ci.org/rails/rails.svg?branch=master)](https://travis-ci.org/rails/rails)
80
80
 
81
81
  ## License
82
82
 
@@ -1,116 +1,27 @@
1
- ## Rails 4.1.16 (July 12, 2016) ##
1
+ * Change Posts to Articles in Getting Started sample application in order to
2
+ better align with the actual guides.
2
3
 
3
- * No changes.
4
-
5
-
6
- ## Rails 4.1.15 (March 07, 2016) ##
7
-
8
- * No changes.
9
-
10
-
11
- ## Rails 4.1.14.2 (February 26, 2016) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 4.1.14.1 (January 25, 2015) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 4.1.14 (November 12, 2015) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 4.1.13 (August 24, 2015) ##
27
-
28
- * No changes.
29
-
30
-
31
- ## Rails 4.1.12 (June 25, 2015) ##
32
-
33
- * No changes.
34
-
35
-
36
- ## Rails 4.1.11 (June 16, 2015) ##
37
-
38
- * No changes.
39
-
40
-
41
- ## Rails 4.1.10 (March 19, 2015) ##
42
-
43
- * No changes.
44
-
45
-
46
- ## Rails 4.1.9 (January 6, 2015) ##
47
-
48
- * No changes.
49
-
50
-
51
- ## Rails 4.1.8 (November 16, 2014) ##
52
-
53
- * No changes.
54
-
55
-
56
- ## Rails 4.1.7.1 (November 19, 2014) ##
57
-
58
- * No changes.
59
-
60
-
61
- ## Rails 4.1.7 (October 29, 2014) ##
62
-
63
- * No changes.
64
-
65
-
66
- ## Rails 4.1.6 (September 11, 2014) ##
67
-
68
- * No changes.
69
-
70
-
71
- ## Rails 4.1.5 (August 18, 2014) ##
72
-
73
- * No changes.
74
-
75
-
76
- ## Rails 4.1.4 (July 2, 2014) ##
77
-
78
- * No changes.
79
-
80
-
81
- ## Rails 4.1.3 (July 2, 2014) ##
82
-
83
- * No changes.
84
-
85
-
86
- ## Rails 4.1.2 (June 26, 2014) ##
4
+ *John Kelly Ferguson*
87
5
 
88
6
  * Update all Rails 4.1.0 references to 4.1.1 within the guides and code.
89
7
 
90
8
  *John Kelly Ferguson*
91
9
 
92
- * Updates the maintenance policy to match the latest versions of Rails.
93
-
94
- *Matias Korhonen*
95
-
10
+ * Split up rows in the Explain Queries table of the ActiveRecord Querying section
11
+ in order to improve readability.
96
12
 
97
- ## Rails 4.1.1 (May 6, 2014) ##
98
-
99
- * No changes.
100
-
101
-
102
- ## Rails 4.1.0 (April 8, 2014) ##
13
+ *John Kelly Ferguson*
103
14
 
104
- * Fixed missing line and shadow on service pages(404, 422, 500).
15
+ * Change all non-HTTP method 'post' references to 'article'.
105
16
 
106
- *Dmitry Korotkov*
17
+ *John Kelly Ferguson*
107
18
 
108
- * Removed repetitive th tags. Instead of them added one th tag with a colspan attribute.
19
+ * Updates the maintenance policy to match the latest versions of Rails
109
20
 
110
- *Sıtkı Bağdat*
21
+ *Matias Korhonen*
111
22
 
112
- * Added the Rails maintenance policy to the guides.
23
+ * Switched the order of `Applying a default scope` and `Merging of scopes` subsections so default scopes are introduced first.
113
24
 
114
- *Matias Korhonen*
25
+ *Alex Riabov*
115
26
 
116
- Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/guides/CHANGELOG.md) for previous changes.
27
+ Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/guides/CHANGELOG.md) for previous changes.
@@ -13,8 +13,8 @@ namespace :guides do
13
13
 
14
14
  desc "Generate .mobi file. The kindlegen executable must be in your PATH. You can get it for free from http://www.amazon.com/kindlepublishing"
15
15
  task :kindle do
16
- unless `kindlerb -v 2> /dev/null` =~ /kindlerb 0.1.1/
17
- abort "Please `gem install kindlerb`"
16
+ unless `kindlerb -v 2> /dev/null` =~ /kindlerb 0.1.1/
17
+ abort "Please `gem install kindlerb` and make sure you have `kindlegen` in your PATH"
18
18
  end
19
19
  unless `convert` =~ /convert/
20
20
  abort "Please install ImageMagick`"
@@ -51,3 +51,9 @@ var guidesIndex = {
51
51
  window.location = url;
52
52
  }
53
53
  };
54
+
55
+ // Disable autolink inside example code blocks of guides.
56
+ $(document).ready(function() {
57
+ SyntaxHighlighter.defaults['auto-links'] = false;
58
+ SyntaxHighlighter.all();
59
+ });
@@ -381,9 +381,12 @@ a, a:link, a:visited {
381
381
  font: inherit;
382
382
  padding-left: .75em;
383
383
  font-size: .95em;
384
- background-position: 96% -65px;
384
+ background-position: 96% 16px;
385
385
  -webkit-appearance: none;
386
386
  }
387
+ .guides-index-small .guides-index-item:hover{
388
+ background-position: 96% -65px;
389
+ }
387
390
  }
388
391
 
389
392
  #guides {
@@ -7,8 +7,8 @@ require 'action_controller/railtie'
7
7
  class TestApp < Rails::Application
8
8
  config.root = File.dirname(__FILE__)
9
9
  config.session_store :cookie_store, key: 'cookie_store_key'
10
- secrets.secret_token = 'secret_token'
11
- secrets.secret_key_base = 'secret_key_base'
10
+ config.secret_token = 'secret_token'
11
+ config.secret_key_base = 'secret_key_base'
12
12
 
13
13
  config.logger = Logger.new($stdout)
14
14
  Rails.logger = config.logger
@@ -2,6 +2,9 @@ unless File.exist?('Gemfile')
2
2
  File.write('Gemfile', <<-GEMFILE)
3
3
  source 'https://rubygems.org'
4
4
  gem 'rails', github: 'rails/rails'
5
+ gem 'arel', github: 'rails/arel'
6
+ gem 'rack', github: 'rack/rack'
7
+ gem 'i18n', github: 'svenfuchs/i18n'
5
8
  GEMFILE
6
9
 
7
10
  system 'bundle'
@@ -16,8 +19,8 @@ require 'action_controller/railtie'
16
19
  class TestApp < Rails::Application
17
20
  config.root = File.dirname(__FILE__)
18
21
  config.session_store :cookie_store, key: 'cookie_store_key'
19
- secrets.secret_token = 'secret_token'
20
- secrets.secret_key_base = 'secret_key_base'
22
+ config.secret_token = 'secret_token'
23
+ config.secret_key_base = 'secret_key_base'
21
24
 
22
25
  config.logger = Logger.new($stdout)
23
26
  Rails.logger = config.logger
@@ -3,6 +3,8 @@ unless File.exist?('Gemfile')
3
3
  source 'https://rubygems.org'
4
4
  gem 'rails', github: 'rails/rails'
5
5
  gem 'arel', github: 'rails/arel'
6
+ gem 'rack', github: 'rack/rack'
7
+ gem 'i18n', github: 'svenfuchs/i18n'
6
8
  gem 'sqlite3'
7
9
  GEMFILE
8
10
 
@@ -24,11 +24,11 @@ begin
24
24
  require 'redcarpet'
25
25
  rescue LoadError
26
26
  # This can happen if doc:guides is executed in an application.
27
- $stderr.puts('Generating guides requires Redcarpet 2.1.1+.')
27
+ $stderr.puts('Generating guides requires Redcarpet 3.1.2+.')
28
28
  $stderr.puts(<<ERROR) if bundler?
29
29
  Please add
30
30
 
31
- gem 'redcarpet', '~> 2.1.1'
31
+ gem 'redcarpet', '~> 3.1.2'
32
32
 
33
33
  to the Gemfile, run
34
34
 
@@ -39,7 +39,7 @@ module RailsGuides
39
39
  def author(name, nick, image = 'credits_pic_blank.gif', &block)
40
40
  image = "images/#{image}"
41
41
 
42
- result = content_tag(:img, nil, :src => image, :class => 'left pic', :alt => name, :width => 91, :height => 91)
42
+ result = tag(:img, :src => image, :class => 'left pic', :alt => name, :width => 91, :height => 91)
43
43
  result << content_tag(:h3, name)
44
44
  result << content_tag(:p, capture(&block))
45
45
  content_tag(:div, result, :class => 'clearfix', :id => nick)
@@ -1,31 +1,39 @@
1
1
  module RailsGuides
2
2
  module Levenshtein
3
- # Based on the pseudocode in http://en.wikipedia.org/wiki/Levenshtein_distance
4
- def self.distance(s1, s2)
5
- s = s1.unpack('U*')
6
- t = s2.unpack('U*')
7
- m = s.length
8
- n = t.length
3
+ # This code is based directly on the Text gem implementation
4
+ # Returns a value representing the "cost" of transforming str1 into str2
5
+ def self.distance str1, str2
6
+ s = str1
7
+ t = str2
8
+ n = s.length
9
+ m = t.length
10
+ max = n/2
9
11
 
10
- # matrix initialization
11
- d = []
12
- 0.upto(m) { |i| d << [i] }
13
- 0.upto(n) { |j| d[0][j] = j }
12
+ return m if (0 == n)
13
+ return n if (0 == m)
14
+ return n if (n - m).abs > max
14
15
 
15
- # distance computation
16
- 1.upto(m) do |i|
17
- 1.upto(n) do |j|
18
- cost = s[i] == t[j] ? 0 : 1
19
- d[i][j] = [
20
- d[i-1][j] + 1, # deletion
21
- d[i][j-1] + 1, # insertion
22
- d[i-1][j-1] + cost, # substitution
23
- ].min
16
+ d = (0..m).to_a
17
+ x = nil
18
+
19
+ str1.each_char.each_with_index do |char1,i|
20
+ e = i+1
21
+
22
+ str2.each_char.each_with_index do |char2,j|
23
+ cost = (char1 == char2) ? 0 : 1
24
+ x = [
25
+ d[j+1] + 1, # insertion
26
+ e + 1, # deletion
27
+ d[j] + cost # substitution
28
+ ].min
29
+ d[j] = e
30
+ e = x
24
31
  end
32
+
33
+ d[m] = x
25
34
  end
26
35
 
27
- # all done
28
- return d[m][n]
36
+ return x
29
37
  end
30
38
  end
31
39
  end
@@ -47,8 +47,7 @@ module RailsGuides
47
47
  end
48
48
 
49
49
  def dom_id_text(text)
50
- text.downcase.gsub(/\?/, '-questionmark').gsub(/!/, '-bang').gsub(/[^a-z0-9]+/, ' ')
51
- .strip.gsub(/\s+/, '-')
50
+ text.downcase.gsub(/\?/, '-questionmark').gsub(/!/, '-bang').gsub(/\s+/, '-')
52
51
  end
53
52
 
54
53
  def engine
@@ -79,10 +78,10 @@ module RailsGuides
79
78
  def generate_structure
80
79
  @headings_for_index = []
81
80
  if @body.present?
82
- @body = Nokogiri::HTML(@body).tap do |doc|
81
+ @body = Nokogiri::HTML.fragment(@body).tap do |doc|
83
82
  hierarchy = []
84
83
 
85
- doc.at('body').children.each do |node|
84
+ doc.children.each do |node|
86
85
  if node.name =~ /^h[3-6]$/
87
86
  case node.name
88
87
  when 'h3'
@@ -116,7 +115,7 @@ module RailsGuides
116
115
  end
117
116
  end
118
117
 
119
- @index = Nokogiri::HTML(engine.render(raw_index)).tap do |doc|
118
+ @index = Nokogiri::HTML.fragment(engine.render(raw_index)).tap do |doc|
120
119
  doc.at('ol')[:class] = 'chapters'
121
120
  end.to_html
122
121
 
@@ -130,8 +129,8 @@ module RailsGuides
130
129
  end
131
130
 
132
131
  def generate_title
133
- if heading = Nokogiri::HTML(@header).at(:h2)
134
- @title = "#{heading.text} — Ruby on Rails Guides".html_safe
132
+ if heading = Nokogiri::HTML.fragment(@header).at(:h2)
133
+ @title = "#{heading.text} — Ruby on Rails Guides"
135
134
  else
136
135
  @title = "Ruby on Rails Guides"
137
136
  end
@@ -50,7 +50,7 @@ HTML
50
50
  when 'erb'
51
51
  'ruby; html-script: true'
52
52
  when 'html'
53
- 'xml' # html is understood, but there are .xml rules in the CSS
53
+ 'xml' # HTML is understood, but there are .xml rules in the CSS
54
54
  else
55
55
  'plain'
56
56
  end
@@ -8,7 +8,7 @@ Rails 2.3 delivers a variety of new and improved features, including pervasive R
8
8
  Application Architecture
9
9
  ------------------------
10
10
 
11
- There are two major changes in the architecture of Rails applications: complete integration of the [Rack](http://rack.rubyforge.org/) modular web server interface, and renewed support for Rails Engines.
11
+ There are two major changes in the architecture of Rails applications: complete integration of the [Rack](http://rack.github.io/) modular web server interface, and renewed support for Rails Engines.
12
12
 
13
13
  ### Rack Integration
14
14
 
@@ -594,7 +594,7 @@ The internals of the various <code>rake gem</code> tasks have been substantially
594
594
  * Various files in /public that deal with CGI and FCGI dispatching are no longer generated in every Rails application by default (you can still get them if you need them by adding `--with-dispatchers` when you run the `rails` command, or add them later with `rake rails:update:generate_dispatchers`).
595
595
  * Rails Guides have been converted from AsciiDoc to Textile markup.
596
596
  * Scaffolded views and controllers have been cleaned up a bit.
597
- * `script/server` now accepts a <tt>--path</tt> argument to mount a Rails application from a specific path.
597
+ * `script/server` now accepts a `--path` argument to mount a Rails application from a specific path.
598
598
  * If any configured gems are missing, the gem rake tasks will skip loading much of the environment. This should solve many of the "chicken-and-egg" problems where rake gems:install couldn't run because gems were missing.
599
599
  * Gems are now unpacked exactly once. This fixes issues with gems (hoe, for instance) which are packed with read-only permissions on the files.
600
600
 
@@ -618,4 +618,4 @@ A few pieces of older code are deprecated in this release:
618
618
  Credits
619
619
  -------
620
620
 
621
- Release notes compiled by [Mike Gunderloy](http://afreshcup.com.) This version of the Rails 2.3 release notes was compiled based on RC2 of Rails 2.3.
621
+ Release notes compiled by [Mike Gunderloy](http://afreshcup.com). This version of the Rails 2.3 release notes was compiled based on RC2 of Rails 2.3.
@@ -294,7 +294,7 @@ NOTE. The old style `map` commands still work as before with a backwards compati
294
294
  Deprecations
295
295
 
296
296
  * The catch all route for non-REST applications (`/:controller/:action/:id`) is now commented out.
297
- * Routes :path\_prefix no longer exists and :name\_prefix now automatically adds "\_" at the end of the given value.
297
+ * Routes `:path_prefix` no longer exists and `:name_prefix` now automatically adds "_" at the end of the given value.
298
298
 
299
299
  More Information:
300
300
  * [The Rails 3 Router: Rack it Up](http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/)
@@ -308,7 +308,7 @@ More Information:
308
308
 
309
309
  Major re-write was done in the Action View helpers, implementing Unobtrusive JavaScript (UJS) hooks and removing the old inline AJAX commands. This enables Rails to use any compliant UJS driver to implement the UJS hooks in the helpers.
310
310
 
311
- What this means is that all previous `remote_<method>` helpers have been removed from Rails core and put into the [Prototype Legacy Helper](http://github.com/rails/prototype_legacy_helper.) To get UJS hooks into your HTML, you now pass `:remote => true` instead. For example:
311
+ What this means is that all previous `remote_<method>` helpers have been removed from Rails core and put into the [Prototype Legacy Helper](http://github.com/rails/prototype_legacy_helper). To get UJS hooks into your HTML, you now pass `:remote => true` instead. For example:
312
312
 
313
313
  ```ruby
314
314
  form_for @post, :remote => true
@@ -521,7 +521,7 @@ A large effort was made in Active Support to make it cherry pickable, that is, y
521
521
  These are the main changes in Active Support:
522
522
 
523
523
  * Large clean up of the library removing unused methods throughout.
524
- * Active Support no longer provides vendored versions of [TZInfo](http://tzinfo.rubyforge.org/), [Memcache Client](http://deveiate.org/projects/RMemCache/) and [Builder](http://builder.rubyforge.org/,) these are all included as dependencies and installed via the `bundle install` command.
524
+ * Active Support no longer provides vendored versions of TZInfo, Memcache Client and Builder. These are all included as dependencies and installed via the `bundle install` command.
525
525
  * Safe buffers are implemented in `ActiveSupport::SafeBuffer`.
526
526
  * Added `Array.uniq_by` and `Array.uniq_by!`.
527
527
  * Removed `Array#rand` and backported `Array#sample` from Ruby 1.9.
@@ -608,4 +608,4 @@ Credits
608
608
 
609
609
  See the [full list of contributors to Rails](http://contributors.rubyonrails.org/) for the many people who spent many hours making Rails 3. Kudos to all of them.
610
610
 
611
- Rails 3.0 Release Notes were compiled by [Mikel Lindsaar](http://lindsaar.net.)
611
+ Rails 3.0 Release Notes were compiled by [Mikel Lindsaar](http://lindsaar.net).
@@ -169,11 +169,11 @@ Rails Architectural Changes
169
169
 
170
170
  The major change in Rails 3.1 is the Assets Pipeline. It makes CSS and JavaScript first-class code citizens and enables proper organization, including use in plugins and engines.
171
171
 
172
- The assets pipeline is powered by [Sprockets](https://github.com/rails/sprockets) and is covered in the [Asset Pipeline](asset_pipeline.html) guide.
172
+ The assets pipeline is powered by [Sprockets](https://github.com/sstephenson/sprockets) and is covered in the [Asset Pipeline](asset_pipeline.html) guide.
173
173
 
174
174
  ### HTTP Streaming
175
175
 
176
- HTTP Streaming is another change that is new in Rails 3.1. This lets the browser download your stylesheets and JavaScript files while the server is still generating the response. This requires Ruby 1.9.2, is opt-in and requires support from the web server as well, but the popular combo of nginx and unicorn is ready to take advantage of it.
176
+ HTTP Streaming is another change that is new in Rails 3.1. This lets the browser download your stylesheets and JavaScript files while the server is still generating the response. This requires Ruby 1.9.2, is opt-in and requires support from the web server as well, but the popular combo of NGINX and Unicorn is ready to take advantage of it.
177
177
 
178
178
  ### Default JS library is now jQuery
179
179