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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/guides/CHANGELOG.md +13 -102
- data/guides/Rakefile +2 -2
- data/guides/assets/javascripts/guides.js +6 -0
- data/guides/assets/stylesheets/main.css +4 -1
- data/guides/bug_report_templates/action_controller_gem.rb +2 -2
- data/guides/bug_report_templates/action_controller_master.rb +5 -2
- data/guides/bug_report_templates/active_record_master.rb +2 -0
- data/guides/rails_guides.rb +2 -2
- data/guides/rails_guides/helpers.rb +1 -1
- data/guides/rails_guides/levenshtein.rb +29 -21
- data/guides/rails_guides/markdown.rb +6 -7
- data/guides/rails_guides/markdown/renderer.rb +1 -1
- data/guides/source/2_3_release_notes.md +3 -3
- data/guides/source/3_0_release_notes.md +4 -4
- data/guides/source/3_1_release_notes.md +2 -2
- data/guides/source/3_2_release_notes.md +2 -2
- data/guides/source/4_1_release_notes.md +8 -9
- data/guides/source/4_2_release_notes.md +572 -0
- data/guides/source/_license.html.erb +1 -1
- data/guides/source/_welcome.html.erb +2 -8
- data/guides/source/action_controller_overview.md +79 -7
- data/guides/source/action_mailer_basics.md +36 -11
- data/guides/source/action_view_overview.md +138 -119
- data/guides/source/active_job_basics.md +253 -0
- data/guides/source/active_model_basics.md +23 -0
- data/guides/source/active_record_basics.md +16 -15
- data/guides/source/active_record_callbacks.md +12 -9
- data/guides/source/{migrations.md → active_record_migrations.md} +90 -217
- data/guides/source/active_record_postgresql.md +437 -0
- data/guides/source/active_record_querying.md +261 -261
- data/guides/source/active_record_validations.md +7 -7
- data/guides/source/active_support_core_extensions.md +105 -44
- data/guides/source/active_support_instrumentation.md +3 -2
- data/guides/source/api_documentation_guidelines.md +62 -16
- data/guides/source/asset_pipeline.md +58 -46
- data/guides/source/association_basics.md +47 -38
- data/guides/source/caching_with_rails.md +31 -6
- data/guides/source/command_line.md +56 -25
- data/guides/source/configuring.md +98 -19
- data/guides/source/contributing_to_ruby_on_rails.md +174 -111
- data/guides/source/credits.html.erb +1 -1
- data/guides/source/debugging_rails_applications.md +438 -284
- data/guides/source/development_dependencies_install.md +17 -4
- data/guides/source/documents.yaml +11 -7
- data/guides/source/engines.md +192 -203
- data/guides/source/form_helpers.md +54 -45
- data/guides/source/generators.md +20 -11
- data/guides/source/getting_started.md +330 -191
- data/guides/source/i18n.md +92 -62
- data/guides/source/index.html.erb +1 -0
- data/guides/source/initialization.md +108 -59
- data/guides/source/layout.html.erb +1 -4
- data/guides/source/layouts_and_rendering.md +24 -23
- data/guides/source/nested_model_forms.md +3 -3
- data/guides/source/plugins.md +26 -26
- data/guides/source/rails_application_templates.md +21 -3
- data/guides/source/rails_on_rack.md +1 -1
- data/guides/source/routing.md +97 -71
- data/guides/source/ruby_on_rails_guides_guidelines.md +10 -12
- data/guides/source/security.md +39 -33
- data/guides/source/testing.md +111 -108
- data/guides/source/upgrading_ruby_on_rails.md +131 -14
- data/guides/source/working_with_javascript_in_rails.md +18 -16
- data/guides/w3c_validator.rb +2 -0
- metadata +37 -94
- data/guides/bug_report_templates/generic_gem.rb +0 -15
- data/guides/bug_report_templates/generic_master.rb +0 -26
- data/guides/code/getting_started/Gemfile +0 -40
- data/guides/code/getting_started/Gemfile.lock +0 -125
- data/guides/code/getting_started/README.rdoc +0 -28
- data/guides/code/getting_started/Rakefile +0 -6
- data/guides/code/getting_started/app/assets/javascripts/application.js +0 -15
- data/guides/code/getting_started/app/assets/javascripts/comments.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/javascripts/posts.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/javascripts/welcome.js.coffee +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/application.css +0 -13
- data/guides/code/getting_started/app/assets/stylesheets/comments.css.scss +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/posts.css.scss +0 -3
- data/guides/code/getting_started/app/assets/stylesheets/welcome.css.scss +0 -3
- data/guides/code/getting_started/app/controllers/application_controller.rb +0 -5
- data/guides/code/getting_started/app/controllers/comments_controller.rb +0 -23
- data/guides/code/getting_started/app/controllers/posts_controller.rb +0 -53
- data/guides/code/getting_started/app/controllers/welcome_controller.rb +0 -4
- data/guides/code/getting_started/app/helpers/application_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/comments_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/posts_helper.rb +0 -2
- data/guides/code/getting_started/app/helpers/welcome_helper.rb +0 -2
- data/guides/code/getting_started/app/models/comment.rb +0 -3
- data/guides/code/getting_started/app/models/post.rb +0 -7
- data/guides/code/getting_started/app/views/comments/_comment.html.erb +0 -15
- data/guides/code/getting_started/app/views/comments/_form.html.erb +0 -13
- data/guides/code/getting_started/app/views/layouts/application.html.erb +0 -14
- data/guides/code/getting_started/app/views/posts/_form.html.erb +0 -27
- data/guides/code/getting_started/app/views/posts/edit.html.erb +0 -5
- data/guides/code/getting_started/app/views/posts/index.html.erb +0 -21
- data/guides/code/getting_started/app/views/posts/new.html.erb +0 -5
- data/guides/code/getting_started/app/views/posts/show.html.erb +0 -18
- data/guides/code/getting_started/app/views/welcome/index.html.erb +0 -4
- data/guides/code/getting_started/bin/bundle +0 -4
- data/guides/code/getting_started/bin/rails +0 -4
- data/guides/code/getting_started/bin/rake +0 -4
- data/guides/code/getting_started/config.ru +0 -4
- data/guides/code/getting_started/config/application.rb +0 -18
- data/guides/code/getting_started/config/boot.rb +0 -4
- data/guides/code/getting_started/config/database.yml +0 -25
- data/guides/code/getting_started/config/environment.rb +0 -5
- data/guides/code/getting_started/config/environments/development.rb +0 -30
- data/guides/code/getting_started/config/environments/production.rb +0 -80
- data/guides/code/getting_started/config/environments/test.rb +0 -36
- data/guides/code/getting_started/config/initializers/backtrace_silencers.rb +0 -7
- data/guides/code/getting_started/config/initializers/filter_parameter_logging.rb +0 -4
- data/guides/code/getting_started/config/initializers/inflections.rb +0 -16
- data/guides/code/getting_started/config/initializers/locale.rb +0 -9
- data/guides/code/getting_started/config/initializers/mime_types.rb +0 -5
- data/guides/code/getting_started/config/initializers/secret_token.rb +0 -12
- data/guides/code/getting_started/config/initializers/session_store.rb +0 -3
- data/guides/code/getting_started/config/initializers/wrap_parameters.rb +0 -14
- data/guides/code/getting_started/config/locales/en.yml +0 -23
- data/guides/code/getting_started/config/routes.rb +0 -7
- data/guides/code/getting_started/db/migrate/20130122042648_create_posts.rb +0 -10
- data/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb +0 -11
- data/guides/code/getting_started/db/schema.rb +0 -33
- data/guides/code/getting_started/db/seeds.rb +0 -7
- data/guides/code/getting_started/public/404.html +0 -60
- data/guides/code/getting_started/public/422.html +0 -60
- data/guides/code/getting_started/public/500.html +0 -59
- data/guides/code/getting_started/public/favicon.ico +0 -0
- data/guides/code/getting_started/public/robots.txt +0 -5
- data/guides/code/getting_started/test/controllers/comments_controller_test.rb +0 -7
- data/guides/code/getting_started/test/controllers/posts_controller_test.rb +0 -7
- data/guides/code/getting_started/test/controllers/welcome_controller_test.rb +0 -9
- data/guides/code/getting_started/test/fixtures/comments.yml +0 -11
- data/guides/code/getting_started/test/fixtures/posts.yml +0 -9
- data/guides/code/getting_started/test/helpers/comments_helper_test.rb +0 -4
- data/guides/code/getting_started/test/helpers/posts_helper_test.rb +0 -4
- data/guides/code/getting_started/test/helpers/welcome_helper_test.rb +0 -4
- data/guides/code/getting_started/test/models/comment_test.rb +0 -7
- data/guides/code/getting_started/test/models/post_test.rb +0 -7
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c417d25c9104b8bd76f1fb1a78d4fe7f8dcb42a6
|
4
|
+
data.tar.gz: db8ef2ff70c6cb7e1f45b910548f381c3dc947fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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://
|
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.
|
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
|
|
data/guides/CHANGELOG.md
CHANGED
@@ -1,116 +1,27 @@
|
|
1
|
-
|
1
|
+
* Change Posts to Articles in Getting Started sample application in order to
|
2
|
+
better align with the actual guides.
|
2
3
|
|
3
|
-
*
|
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
|
-
*
|
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
|
-
|
98
|
-
|
99
|
-
* No changes.
|
100
|
-
|
101
|
-
|
102
|
-
## Rails 4.1.0 (April 8, 2014) ##
|
13
|
+
*John Kelly Ferguson*
|
103
14
|
|
104
|
-
*
|
15
|
+
* Change all non-HTTP method 'post' references to 'article'.
|
105
16
|
|
106
|
-
*
|
17
|
+
*John Kelly Ferguson*
|
107
18
|
|
108
|
-
*
|
19
|
+
* Updates the maintenance policy to match the latest versions of Rails
|
109
20
|
|
110
|
-
*
|
21
|
+
*Matias Korhonen*
|
111
22
|
|
112
|
-
*
|
23
|
+
* Switched the order of `Applying a default scope` and `Merging of scopes` subsections so default scopes are introduced first.
|
113
24
|
|
114
|
-
*
|
25
|
+
*Alex Riabov*
|
115
26
|
|
116
|
-
Please check [4-
|
27
|
+
Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/guides/CHANGELOG.md) for previous changes.
|
data/guides/Rakefile
CHANGED
@@ -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`"
|
@@ -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%
|
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
|
-
|
11
|
-
|
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
|
-
|
20
|
-
|
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
|
data/guides/rails_guides.rb
CHANGED
@@ -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
|
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', '~>
|
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 =
|
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
|
-
#
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
n =
|
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
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
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(
|
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.
|
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"
|
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
|
@@ -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.
|
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
|
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.
|
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
|
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.
|
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
|
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/
|
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
|
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
|
|