rails 4.2.0.beta4 → 4.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/guides/Rakefile +3 -1
  3. data/guides/bug_report_templates/action_controller_gem.rb +2 -2
  4. data/guides/bug_report_templates/action_controller_master.rb +2 -2
  5. data/guides/source/3_0_release_notes.md +2 -2
  6. data/guides/source/4_1_release_notes.md +1 -1
  7. data/guides/source/4_2_release_notes.md +250 -225
  8. data/guides/source/_welcome.html.erb +1 -1
  9. data/guides/source/action_controller_overview.md +6 -6
  10. data/guides/source/action_mailer_basics.md +26 -11
  11. data/guides/source/action_view_overview.md +0 -1
  12. data/guides/source/active_job_basics.md +29 -23
  13. data/guides/source/active_record_postgresql.md +2 -7
  14. data/guides/source/active_record_validations.md +1 -0
  15. data/guides/source/active_support_core_extensions.md +1 -1
  16. data/guides/source/active_support_instrumentation.md +5 -5
  17. data/guides/source/asset_pipeline.md +2 -2
  18. data/guides/source/association_basics.md +0 -2
  19. data/guides/source/command_line.md +6 -15
  20. data/guides/source/configuring.md +4 -4
  21. data/guides/source/documents.yaml +0 -1
  22. data/guides/source/engines.md +26 -15
  23. data/guides/source/form_helpers.md +10 -2
  24. data/guides/source/getting_started.md +9 -9
  25. data/guides/source/rails_on_rack.md +2 -2
  26. data/guides/source/ruby_on_rails_guides_guidelines.md +1 -0
  27. data/guides/source/security.md +1 -1
  28. data/guides/source/testing.md +80 -13
  29. data/guides/source/upgrading_ruby_on_rails.md +23 -20
  30. metadata +29 -229
  31. data/guides/output/2_2_release_notes.html +0 -724
  32. data/guides/output/2_3_release_notes.html +0 -870
  33. data/guides/output/3_0_release_notes.html +0 -773
  34. data/guides/output/3_1_release_notes.html +0 -740
  35. data/guides/output/3_2_release_notes.html +0 -797
  36. data/guides/output/4_0_release_notes.html +0 -523
  37. data/guides/output/4_1_release_notes.html +0 -806
  38. data/guides/output/4_2_release_notes.html +0 -728
  39. data/guides/output/Gemfile +0 -6
  40. data/guides/output/_license.html +0 -226
  41. data/guides/output/_welcome.html +0 -233
  42. data/guides/output/action_controller_overview.html +0 -1335
  43. data/guides/output/action_mailer_basics.html +0 -928
  44. data/guides/output/action_view_overview.html +0 -1509
  45. data/guides/output/active_job_basics.html +0 -546
  46. data/guides/output/active_model_basics.html +0 -438
  47. data/guides/output/active_record_basics.html +0 -594
  48. data/guides/output/active_record_callbacks.html +0 -592
  49. data/guides/output/active_record_migrations.html +0 -1123
  50. data/guides/output/active_record_postgresql.html +0 -675
  51. data/guides/output/active_record_querying.html +0 -1796
  52. data/guides/output/active_record_validations.html +0 -1301
  53. data/guides/output/active_support_core_extensions.html +0 -3450
  54. data/guides/output/active_support_instrumentation.html +0 -1121
  55. data/guides/output/api_documentation_guidelines.html +0 -498
  56. data/guides/output/asset_pipeline.html +0 -1167
  57. data/guides/output/association_basics.html +0 -2086
  58. data/guides/output/caching_with_rails.html +0 -553
  59. data/guides/output/command_line.html +0 -791
  60. data/guides/output/configuring.html +0 -1055
  61. data/guides/output/contributing_to_ruby_on_rails.html +0 -657
  62. data/guides/output/credits.html +0 -284
  63. data/guides/output/debugging_rails_applications.html +0 -1014
  64. data/guides/output/development_dependencies_install.html +0 -478
  65. data/guides/output/engines.html +0 -1438
  66. data/guides/output/form_helpers.html +0 -1074
  67. data/guides/output/generators.html +0 -838
  68. data/guides/output/getting_started.html +0 -2092
  69. data/guides/output/i18n.html +0 -1198
  70. data/guides/output/images/akshaysurve.jpg +0 -0
  71. data/guides/output/images/belongs_to.png +0 -0
  72. data/guides/output/images/book_icon.gif +0 -0
  73. data/guides/output/images/bullet.gif +0 -0
  74. data/guides/output/images/chapters_icon.gif +0 -0
  75. data/guides/output/images/check_bullet.gif +0 -0
  76. data/guides/output/images/credits_pic_blank.gif +0 -0
  77. data/guides/output/images/csrf.png +0 -0
  78. data/guides/output/images/edge_badge.png +0 -0
  79. data/guides/output/images/favicon.ico +0 -0
  80. data/guides/output/images/feature_tile.gif +0 -0
  81. data/guides/output/images/footer_tile.gif +0 -0
  82. data/guides/output/images/fxn.png +0 -0
  83. data/guides/output/images/getting_started/article_with_comments.png +0 -0
  84. data/guides/output/images/getting_started/challenge.png +0 -0
  85. data/guides/output/images/getting_started/confirm_dialog.png +0 -0
  86. data/guides/output/images/getting_started/forbidden_attributes_for_new_article.png +0 -0
  87. data/guides/output/images/getting_started/forbidden_attributes_for_new_post.png +0 -0
  88. data/guides/output/images/getting_started/form_with_errors.png +0 -0
  89. data/guides/output/images/getting_started/index_action_with_edit_link.png +0 -0
  90. data/guides/output/images/getting_started/new_article.png +0 -0
  91. data/guides/output/images/getting_started/new_post.png +0 -0
  92. data/guides/output/images/getting_started/post_with_comments.png +0 -0
  93. data/guides/output/images/getting_started/rails_welcome.png +0 -0
  94. data/guides/output/images/getting_started/routing_error_no_controller.png +0 -0
  95. data/guides/output/images/getting_started/routing_error_no_route_matches.png +0 -0
  96. data/guides/output/images/getting_started/show_action_for_articles.png +0 -0
  97. data/guides/output/images/getting_started/show_action_for_posts.png +0 -0
  98. data/guides/output/images/getting_started/template_is_missing_articles_new.png +0 -0
  99. data/guides/output/images/getting_started/template_is_missing_posts_new.png +0 -0
  100. data/guides/output/images/getting_started/undefined_method_post_path.png +0 -0
  101. data/guides/output/images/getting_started/unknown_action_create_for_articles.png +0 -0
  102. data/guides/output/images/getting_started/unknown_action_create_for_posts.png +0 -0
  103. data/guides/output/images/getting_started/unknown_action_new_for_articles.png +0 -0
  104. data/guides/output/images/getting_started/unknown_action_new_for_posts.png +0 -0
  105. data/guides/output/images/grey_bullet.gif +0 -0
  106. data/guides/output/images/habtm.png +0 -0
  107. data/guides/output/images/has_many.png +0 -0
  108. data/guides/output/images/has_many_through.png +0 -0
  109. data/guides/output/images/has_one.png +0 -0
  110. data/guides/output/images/has_one_through.png +0 -0
  111. data/guides/output/images/header_backdrop.png +0 -0
  112. data/guides/output/images/header_tile.gif +0 -0
  113. data/guides/output/images/i18n/demo_html_safe.png +0 -0
  114. data/guides/output/images/i18n/demo_localized_pirate.png +0 -0
  115. data/guides/output/images/i18n/demo_translated_en.png +0 -0
  116. data/guides/output/images/i18n/demo_translated_pirate.png +0 -0
  117. data/guides/output/images/i18n/demo_translation_missing.png +0 -0
  118. data/guides/output/images/i18n/demo_untranslated.png +0 -0
  119. data/guides/output/images/icons/README +0 -5
  120. data/guides/output/images/icons/callouts/1.png +0 -0
  121. data/guides/output/images/icons/callouts/10.png +0 -0
  122. data/guides/output/images/icons/callouts/11.png +0 -0
  123. data/guides/output/images/icons/callouts/12.png +0 -0
  124. data/guides/output/images/icons/callouts/13.png +0 -0
  125. data/guides/output/images/icons/callouts/14.png +0 -0
  126. data/guides/output/images/icons/callouts/15.png +0 -0
  127. data/guides/output/images/icons/callouts/2.png +0 -0
  128. data/guides/output/images/icons/callouts/3.png +0 -0
  129. data/guides/output/images/icons/callouts/4.png +0 -0
  130. data/guides/output/images/icons/callouts/5.png +0 -0
  131. data/guides/output/images/icons/callouts/6.png +0 -0
  132. data/guides/output/images/icons/callouts/7.png +0 -0
  133. data/guides/output/images/icons/callouts/8.png +0 -0
  134. data/guides/output/images/icons/callouts/9.png +0 -0
  135. data/guides/output/images/icons/caution.png +0 -0
  136. data/guides/output/images/icons/example.png +0 -0
  137. data/guides/output/images/icons/home.png +0 -0
  138. data/guides/output/images/icons/important.png +0 -0
  139. data/guides/output/images/icons/next.png +0 -0
  140. data/guides/output/images/icons/note.png +0 -0
  141. data/guides/output/images/icons/prev.png +0 -0
  142. data/guides/output/images/icons/tip.png +0 -0
  143. data/guides/output/images/icons/up.png +0 -0
  144. data/guides/output/images/icons/warning.png +0 -0
  145. data/guides/output/images/nav_arrow.gif +0 -0
  146. data/guides/output/images/oscardelben.jpg +0 -0
  147. data/guides/output/images/polymorphic.png +0 -0
  148. data/guides/output/images/radar.png +0 -0
  149. data/guides/output/images/rails4_features.png +0 -0
  150. data/guides/output/images/rails_guides_kindle_cover.jpg +0 -0
  151. data/guides/output/images/rails_guides_logo.gif +0 -0
  152. data/guides/output/images/rails_logo_remix.gif +0 -0
  153. data/guides/output/images/session_fixation.png +0 -0
  154. data/guides/output/images/tab_grey.gif +0 -0
  155. data/guides/output/images/tab_info.gif +0 -0
  156. data/guides/output/images/tab_note.gif +0 -0
  157. data/guides/output/images/tab_red.gif +0 -0
  158. data/guides/output/images/tab_yellow.gif +0 -0
  159. data/guides/output/images/tab_yellow.png +0 -0
  160. data/guides/output/images/vijaydev.jpg +0 -0
  161. data/guides/output/index.html +0 -354
  162. data/guides/output/initialization.html +0 -876
  163. data/guides/output/javascripts/guides.js +0 -59
  164. data/guides/output/javascripts/jquery.min.js +0 -4
  165. data/guides/output/javascripts/responsive-tables.js +0 -43
  166. data/guides/output/javascripts/syntaxhighlighter/shBrushAS3.js +0 -59
  167. data/guides/output/javascripts/syntaxhighlighter/shBrushAppleScript.js +0 -75
  168. data/guides/output/javascripts/syntaxhighlighter/shBrushBash.js +0 -59
  169. data/guides/output/javascripts/syntaxhighlighter/shBrushCSharp.js +0 -65
  170. data/guides/output/javascripts/syntaxhighlighter/shBrushColdFusion.js +0 -100
  171. data/guides/output/javascripts/syntaxhighlighter/shBrushCpp.js +0 -97
  172. data/guides/output/javascripts/syntaxhighlighter/shBrushCss.js +0 -91
  173. data/guides/output/javascripts/syntaxhighlighter/shBrushDelphi.js +0 -55
  174. data/guides/output/javascripts/syntaxhighlighter/shBrushDiff.js +0 -41
  175. data/guides/output/javascripts/syntaxhighlighter/shBrushErlang.js +0 -52
  176. data/guides/output/javascripts/syntaxhighlighter/shBrushGroovy.js +0 -67
  177. data/guides/output/javascripts/syntaxhighlighter/shBrushJScript.js +0 -52
  178. data/guides/output/javascripts/syntaxhighlighter/shBrushJava.js +0 -57
  179. data/guides/output/javascripts/syntaxhighlighter/shBrushJavaFX.js +0 -58
  180. data/guides/output/javascripts/syntaxhighlighter/shBrushPerl.js +0 -72
  181. data/guides/output/javascripts/syntaxhighlighter/shBrushPhp.js +0 -88
  182. data/guides/output/javascripts/syntaxhighlighter/shBrushPlain.js +0 -33
  183. data/guides/output/javascripts/syntaxhighlighter/shBrushPowerShell.js +0 -74
  184. data/guides/output/javascripts/syntaxhighlighter/shBrushPython.js +0 -64
  185. data/guides/output/javascripts/syntaxhighlighter/shBrushRuby.js +0 -55
  186. data/guides/output/javascripts/syntaxhighlighter/shBrushSass.js +0 -94
  187. data/guides/output/javascripts/syntaxhighlighter/shBrushScala.js +0 -51
  188. data/guides/output/javascripts/syntaxhighlighter/shBrushSql.js +0 -66
  189. data/guides/output/javascripts/syntaxhighlighter/shBrushVb.js +0 -56
  190. data/guides/output/javascripts/syntaxhighlighter/shBrushXml.js +0 -69
  191. data/guides/output/javascripts/syntaxhighlighter/shCore.js +0 -17
  192. data/guides/output/layout.html +0 -448
  193. data/guides/output/layouts_and_rendering.html +0 -1541
  194. data/guides/output/maintenance_policy.html +0 -257
  195. data/guides/output/migrations.html +0 -1360
  196. data/guides/output/nested_model_forms.html +0 -412
  197. data/guides/output/plugins.html +0 -644
  198. data/guides/output/rails_application_templates.html +0 -450
  199. data/guides/output/rails_on_rack.html +0 -547
  200. data/guides/output/routing.html +0 -1631
  201. data/guides/output/ruby_on_rails_guides_guidelines.html +0 -329
  202. data/guides/output/security.html +0 -935
  203. data/guides/output/stylesheets/fixes.css +0 -16
  204. data/guides/output/stylesheets/kindle.css +0 -11
  205. data/guides/output/stylesheets/main.css +0 -713
  206. data/guides/output/stylesheets/print.css +0 -52
  207. data/guides/output/stylesheets/reset.css +0 -43
  208. data/guides/output/stylesheets/responsive-tables.css +0 -50
  209. data/guides/output/stylesheets/style.css +0 -13
  210. data/guides/output/stylesheets/syntaxhighlighter/shCore.css +0 -226
  211. data/guides/output/stylesheets/syntaxhighlighter/shCoreDefault.css +0 -328
  212. data/guides/output/stylesheets/syntaxhighlighter/shCoreDjango.css +0 -331
  213. data/guides/output/stylesheets/syntaxhighlighter/shCoreEclipse.css +0 -339
  214. data/guides/output/stylesheets/syntaxhighlighter/shCoreEmacs.css +0 -324
  215. data/guides/output/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
  216. data/guides/output/stylesheets/syntaxhighlighter/shCoreMDUltra.css +0 -324
  217. data/guides/output/stylesheets/syntaxhighlighter/shCoreMidnight.css +0 -324
  218. data/guides/output/stylesheets/syntaxhighlighter/shCoreRDark.css +0 -324
  219. data/guides/output/stylesheets/syntaxhighlighter/shThemeDefault.css +0 -117
  220. data/guides/output/stylesheets/syntaxhighlighter/shThemeDjango.css +0 -120
  221. data/guides/output/stylesheets/syntaxhighlighter/shThemeEclipse.css +0 -128
  222. data/guides/output/stylesheets/syntaxhighlighter/shThemeEmacs.css +0 -113
  223. data/guides/output/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
  224. data/guides/output/stylesheets/syntaxhighlighter/shThemeMDUltra.css +0 -113
  225. data/guides/output/stylesheets/syntaxhighlighter/shThemeMidnight.css +0 -113
  226. data/guides/output/stylesheets/syntaxhighlighter/shThemeRDark.css +0 -113
  227. data/guides/output/stylesheets/syntaxhighlighter/shThemeRailsGuides.css +0 -116
  228. data/guides/output/testing.html +0 -1350
  229. data/guides/output/upgrading_ruby_on_rails.html +0 -1135
  230. data/guides/output/working_with_javascript_in_rails.html +0 -587
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.beta4
4
+ version: 4.2.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-30 00:00:00.000000000 Z
11
+ date: 2014-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,146 +16,146 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0.beta4
19
+ version: 4.2.0.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.0.beta4
26
+ version: 4.2.0.rc1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.0.beta4
33
+ version: 4.2.0.rc1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.0.beta4
40
+ version: 4.2.0.rc1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: actionview
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 4.2.0.beta4
47
+ version: 4.2.0.rc1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 4.2.0.beta4
54
+ version: 4.2.0.rc1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activemodel
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 4.2.0.beta4
61
+ version: 4.2.0.rc1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 4.2.0.beta4
68
+ version: 4.2.0.rc1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activerecord
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 4.2.0.beta4
75
+ version: 4.2.0.rc1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 4.2.0.beta4
82
+ version: 4.2.0.rc1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: actionmailer
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 4.2.0.beta4
89
+ version: 4.2.0.rc1
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 4.2.0.beta4
96
+ version: 4.2.0.rc1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: activejob
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 4.2.0.beta4
103
+ version: 4.2.0.rc1
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 4.2.0.beta4
110
+ version: 4.2.0.rc1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: railties
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 4.2.0.beta4
117
+ version: 4.2.0.rc1
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 4.2.0.beta4
124
+ version: 4.2.0.rc1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: bundler
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: 1.3.0
132
- - - <
132
+ - - "<"
133
133
  - !ruby/object:Gem::Version
134
134
  version: '2.0'
135
135
  type: :runtime
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - '>='
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: 1.3.0
142
- - - <
142
+ - - "<"
143
143
  - !ruby/object:Gem::Version
144
144
  version: '2.0'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: sprockets-rails
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ~>
149
+ - - ">="
150
150
  - !ruby/object:Gem::Version
151
- version: 3.0.0.beta1
151
+ version: '0'
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ~>
156
+ - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: 3.0.0.beta1
158
+ version: '0'
159
159
  description: Ruby on Rails is a full-stack web framework optimized for programmer
160
160
  happiness and sustainable productivity. It encourages beautiful code by favoring
161
161
  convention over configuration.
@@ -308,206 +308,6 @@ files:
308
308
  - guides/bug_report_templates/action_controller_master.rb
309
309
  - guides/bug_report_templates/active_record_gem.rb
310
310
  - guides/bug_report_templates/active_record_master.rb
311
- - guides/output/2_2_release_notes.html
312
- - guides/output/2_3_release_notes.html
313
- - guides/output/3_0_release_notes.html
314
- - guides/output/3_1_release_notes.html
315
- - guides/output/3_2_release_notes.html
316
- - guides/output/4_0_release_notes.html
317
- - guides/output/4_1_release_notes.html
318
- - guides/output/4_2_release_notes.html
319
- - guides/output/Gemfile
320
- - guides/output/_license.html
321
- - guides/output/_welcome.html
322
- - guides/output/action_controller_overview.html
323
- - guides/output/action_mailer_basics.html
324
- - guides/output/action_view_overview.html
325
- - guides/output/active_job_basics.html
326
- - guides/output/active_model_basics.html
327
- - guides/output/active_record_basics.html
328
- - guides/output/active_record_callbacks.html
329
- - guides/output/active_record_migrations.html
330
- - guides/output/active_record_postgresql.html
331
- - guides/output/active_record_querying.html
332
- - guides/output/active_record_validations.html
333
- - guides/output/active_support_core_extensions.html
334
- - guides/output/active_support_instrumentation.html
335
- - guides/output/api_documentation_guidelines.html
336
- - guides/output/asset_pipeline.html
337
- - guides/output/association_basics.html
338
- - guides/output/caching_with_rails.html
339
- - guides/output/command_line.html
340
- - guides/output/configuring.html
341
- - guides/output/contributing_to_ruby_on_rails.html
342
- - guides/output/credits.html
343
- - guides/output/debugging_rails_applications.html
344
- - guides/output/development_dependencies_install.html
345
- - guides/output/engines.html
346
- - guides/output/form_helpers.html
347
- - guides/output/generators.html
348
- - guides/output/getting_started.html
349
- - guides/output/i18n.html
350
- - guides/output/images/akshaysurve.jpg
351
- - guides/output/images/belongs_to.png
352
- - guides/output/images/book_icon.gif
353
- - guides/output/images/bullet.gif
354
- - guides/output/images/chapters_icon.gif
355
- - guides/output/images/check_bullet.gif
356
- - guides/output/images/credits_pic_blank.gif
357
- - guides/output/images/csrf.png
358
- - guides/output/images/edge_badge.png
359
- - guides/output/images/favicon.ico
360
- - guides/output/images/feature_tile.gif
361
- - guides/output/images/footer_tile.gif
362
- - guides/output/images/fxn.png
363
- - guides/output/images/getting_started/article_with_comments.png
364
- - guides/output/images/getting_started/challenge.png
365
- - guides/output/images/getting_started/confirm_dialog.png
366
- - guides/output/images/getting_started/forbidden_attributes_for_new_article.png
367
- - guides/output/images/getting_started/forbidden_attributes_for_new_post.png
368
- - guides/output/images/getting_started/form_with_errors.png
369
- - guides/output/images/getting_started/index_action_with_edit_link.png
370
- - guides/output/images/getting_started/new_article.png
371
- - guides/output/images/getting_started/new_post.png
372
- - guides/output/images/getting_started/post_with_comments.png
373
- - guides/output/images/getting_started/rails_welcome.png
374
- - guides/output/images/getting_started/routing_error_no_controller.png
375
- - guides/output/images/getting_started/routing_error_no_route_matches.png
376
- - guides/output/images/getting_started/show_action_for_articles.png
377
- - guides/output/images/getting_started/show_action_for_posts.png
378
- - guides/output/images/getting_started/template_is_missing_articles_new.png
379
- - guides/output/images/getting_started/template_is_missing_posts_new.png
380
- - guides/output/images/getting_started/undefined_method_post_path.png
381
- - guides/output/images/getting_started/unknown_action_create_for_articles.png
382
- - guides/output/images/getting_started/unknown_action_create_for_posts.png
383
- - guides/output/images/getting_started/unknown_action_new_for_articles.png
384
- - guides/output/images/getting_started/unknown_action_new_for_posts.png
385
- - guides/output/images/grey_bullet.gif
386
- - guides/output/images/habtm.png
387
- - guides/output/images/has_many.png
388
- - guides/output/images/has_many_through.png
389
- - guides/output/images/has_one.png
390
- - guides/output/images/has_one_through.png
391
- - guides/output/images/header_backdrop.png
392
- - guides/output/images/header_tile.gif
393
- - guides/output/images/i18n/demo_html_safe.png
394
- - guides/output/images/i18n/demo_localized_pirate.png
395
- - guides/output/images/i18n/demo_translated_en.png
396
- - guides/output/images/i18n/demo_translated_pirate.png
397
- - guides/output/images/i18n/demo_translation_missing.png
398
- - guides/output/images/i18n/demo_untranslated.png
399
- - guides/output/images/icons/README
400
- - guides/output/images/icons/callouts/1.png
401
- - guides/output/images/icons/callouts/10.png
402
- - guides/output/images/icons/callouts/11.png
403
- - guides/output/images/icons/callouts/12.png
404
- - guides/output/images/icons/callouts/13.png
405
- - guides/output/images/icons/callouts/14.png
406
- - guides/output/images/icons/callouts/15.png
407
- - guides/output/images/icons/callouts/2.png
408
- - guides/output/images/icons/callouts/3.png
409
- - guides/output/images/icons/callouts/4.png
410
- - guides/output/images/icons/callouts/5.png
411
- - guides/output/images/icons/callouts/6.png
412
- - guides/output/images/icons/callouts/7.png
413
- - guides/output/images/icons/callouts/8.png
414
- - guides/output/images/icons/callouts/9.png
415
- - guides/output/images/icons/caution.png
416
- - guides/output/images/icons/example.png
417
- - guides/output/images/icons/home.png
418
- - guides/output/images/icons/important.png
419
- - guides/output/images/icons/next.png
420
- - guides/output/images/icons/note.png
421
- - guides/output/images/icons/prev.png
422
- - guides/output/images/icons/tip.png
423
- - guides/output/images/icons/up.png
424
- - guides/output/images/icons/warning.png
425
- - guides/output/images/nav_arrow.gif
426
- - guides/output/images/oscardelben.jpg
427
- - guides/output/images/polymorphic.png
428
- - guides/output/images/radar.png
429
- - guides/output/images/rails4_features.png
430
- - guides/output/images/rails_guides_kindle_cover.jpg
431
- - guides/output/images/rails_guides_logo.gif
432
- - guides/output/images/rails_logo_remix.gif
433
- - guides/output/images/session_fixation.png
434
- - guides/output/images/tab_grey.gif
435
- - guides/output/images/tab_info.gif
436
- - guides/output/images/tab_note.gif
437
- - guides/output/images/tab_red.gif
438
- - guides/output/images/tab_yellow.gif
439
- - guides/output/images/tab_yellow.png
440
- - guides/output/images/vijaydev.jpg
441
- - guides/output/index.html
442
- - guides/output/initialization.html
443
- - guides/output/javascripts/guides.js
444
- - guides/output/javascripts/jquery.min.js
445
- - guides/output/javascripts/responsive-tables.js
446
- - guides/output/javascripts/syntaxhighlighter/shBrushAS3.js
447
- - guides/output/javascripts/syntaxhighlighter/shBrushAppleScript.js
448
- - guides/output/javascripts/syntaxhighlighter/shBrushBash.js
449
- - guides/output/javascripts/syntaxhighlighter/shBrushCSharp.js
450
- - guides/output/javascripts/syntaxhighlighter/shBrushColdFusion.js
451
- - guides/output/javascripts/syntaxhighlighter/shBrushCpp.js
452
- - guides/output/javascripts/syntaxhighlighter/shBrushCss.js
453
- - guides/output/javascripts/syntaxhighlighter/shBrushDelphi.js
454
- - guides/output/javascripts/syntaxhighlighter/shBrushDiff.js
455
- - guides/output/javascripts/syntaxhighlighter/shBrushErlang.js
456
- - guides/output/javascripts/syntaxhighlighter/shBrushGroovy.js
457
- - guides/output/javascripts/syntaxhighlighter/shBrushJScript.js
458
- - guides/output/javascripts/syntaxhighlighter/shBrushJava.js
459
- - guides/output/javascripts/syntaxhighlighter/shBrushJavaFX.js
460
- - guides/output/javascripts/syntaxhighlighter/shBrushPerl.js
461
- - guides/output/javascripts/syntaxhighlighter/shBrushPhp.js
462
- - guides/output/javascripts/syntaxhighlighter/shBrushPlain.js
463
- - guides/output/javascripts/syntaxhighlighter/shBrushPowerShell.js
464
- - guides/output/javascripts/syntaxhighlighter/shBrushPython.js
465
- - guides/output/javascripts/syntaxhighlighter/shBrushRuby.js
466
- - guides/output/javascripts/syntaxhighlighter/shBrushSass.js
467
- - guides/output/javascripts/syntaxhighlighter/shBrushScala.js
468
- - guides/output/javascripts/syntaxhighlighter/shBrushSql.js
469
- - guides/output/javascripts/syntaxhighlighter/shBrushVb.js
470
- - guides/output/javascripts/syntaxhighlighter/shBrushXml.js
471
- - guides/output/javascripts/syntaxhighlighter/shCore.js
472
- - guides/output/layout.html
473
- - guides/output/layouts_and_rendering.html
474
- - guides/output/maintenance_policy.html
475
- - guides/output/migrations.html
476
- - guides/output/nested_model_forms.html
477
- - guides/output/plugins.html
478
- - guides/output/rails_application_templates.html
479
- - guides/output/rails_on_rack.html
480
- - guides/output/routing.html
481
- - guides/output/ruby_on_rails_guides_guidelines.html
482
- - guides/output/security.html
483
- - guides/output/stylesheets/fixes.css
484
- - guides/output/stylesheets/kindle.css
485
- - guides/output/stylesheets/main.css
486
- - guides/output/stylesheets/print.css
487
- - guides/output/stylesheets/reset.css
488
- - guides/output/stylesheets/responsive-tables.css
489
- - guides/output/stylesheets/style.css
490
- - guides/output/stylesheets/syntaxhighlighter/shCore.css
491
- - guides/output/stylesheets/syntaxhighlighter/shCoreDefault.css
492
- - guides/output/stylesheets/syntaxhighlighter/shCoreDjango.css
493
- - guides/output/stylesheets/syntaxhighlighter/shCoreEclipse.css
494
- - guides/output/stylesheets/syntaxhighlighter/shCoreEmacs.css
495
- - guides/output/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css
496
- - guides/output/stylesheets/syntaxhighlighter/shCoreMDUltra.css
497
- - guides/output/stylesheets/syntaxhighlighter/shCoreMidnight.css
498
- - guides/output/stylesheets/syntaxhighlighter/shCoreRDark.css
499
- - guides/output/stylesheets/syntaxhighlighter/shThemeDefault.css
500
- - guides/output/stylesheets/syntaxhighlighter/shThemeDjango.css
501
- - guides/output/stylesheets/syntaxhighlighter/shThemeEclipse.css
502
- - guides/output/stylesheets/syntaxhighlighter/shThemeEmacs.css
503
- - guides/output/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css
504
- - guides/output/stylesheets/syntaxhighlighter/shThemeMDUltra.css
505
- - guides/output/stylesheets/syntaxhighlighter/shThemeMidnight.css
506
- - guides/output/stylesheets/syntaxhighlighter/shThemeRDark.css
507
- - guides/output/stylesheets/syntaxhighlighter/shThemeRailsGuides.css
508
- - guides/output/testing.html
509
- - guides/output/upgrading_ruby_on_rails.html
510
- - guides/output/working_with_javascript_in_rails.html
511
311
  - guides/rails_guides.rb
512
312
  - guides/rails_guides/generator.rb
513
313
  - guides/rails_guides/helpers.rb
@@ -587,17 +387,17 @@ require_paths:
587
387
  - lib
588
388
  required_ruby_version: !ruby/object:Gem::Requirement
589
389
  requirements:
590
- - - '>='
390
+ - - ">="
591
391
  - !ruby/object:Gem::Version
592
392
  version: 1.9.3
593
393
  required_rubygems_version: !ruby/object:Gem::Requirement
594
394
  requirements:
595
- - - '>='
395
+ - - ">="
596
396
  - !ruby/object:Gem::Version
597
397
  version: 1.8.11
598
398
  requirements: []
599
399
  rubyforge_project:
600
- rubygems_version: 2.2.1
400
+ rubygems_version: 2.2.2
601
401
  signing_key:
602
402
  specification_version: 4
603
403
  summary: Full-stack web application framework.
@@ -1,724 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
7
-
8
- <title>Ruby on Rails 2.2 Release Notes — Ruby on Rails Guides</title>
9
- <link rel="stylesheet" type="text/css" href="stylesheets/style.css" />
10
- <link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
11
-
12
- <link rel="stylesheet" type="text/css" href="stylesheets/syntaxhighlighter/shCore.css" />
13
- <link rel="stylesheet" type="text/css" href="stylesheets/syntaxhighlighter/shThemeRailsGuides.css" />
14
-
15
- <link rel="stylesheet" type="text/css" href="stylesheets/fixes.css" />
16
-
17
- <link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
18
- </head>
19
- <body class="guide">
20
- <div id="topNav">
21
- <div class="wrapper">
22
- <strong class="more-info-label">More at <a href="http://rubyonrails.org/">rubyonrails.org:</a> </strong>
23
- <span class="red-button more-info-button">
24
- More Ruby on Rails
25
- </span>
26
- <ul class="more-info-links s-hidden">
27
- <li class="more-info"><a href="http://rubyonrails.org/">Overview</a></li>
28
- <li class="more-info"><a href="http://rubyonrails.org/download">Download</a></li>
29
- <li class="more-info"><a href="http://rubyonrails.org/deploy">Deploy</a></li>
30
- <li class="more-info"><a href="https://github.com/rails/rails">Code</a></li>
31
- <li class="more-info"><a href="http://rubyonrails.org/screencasts">Screencasts</a></li>
32
- <li class="more-info"><a href="http://rubyonrails.org/documentation">Documentation</a></li>
33
- <li class="more-info"><a href="http://rubyonrails.org/community">Community</a></li>
34
- <li class="more-info"><a href="http://weblog.rubyonrails.org/">Blog</a></li>
35
- </ul>
36
- </div>
37
- </div>
38
- <div id="header">
39
- <div class="wrapper clearfix">
40
- <h1><a href="index.html" title="Return to home page">Guides.rubyonrails.org</a></h1>
41
- <ul class="nav">
42
- <li><a class="nav-item" href="index.html">Home</a></li>
43
- <li class="guides-index guides-index-large">
44
- <a href="index.html" id="guidesMenu" class="guides-index-item nav-item">Guides Index</a>
45
- <div id="guides" class="clearfix" style="display: none;">
46
- <hr />
47
- <dl class="L">
48
- <dt>Start Here</dt>
49
- <dd><a href="getting_started.html">Getting Started with Rails</a></dd>
50
- <dt>Models</dt>
51
- <dd><a href="active_record_basics.html">Active Record Basics</a></dd>
52
- <dd><a href="active_record_migrations.html">Active Record Migrations</a></dd>
53
- <dd><a href="active_record_validations.html">Active Record Validations</a></dd>
54
- <dd><a href="active_record_callbacks.html">Active Record Callbacks</a></dd>
55
- <dd><a href="association_basics.html">Active Record Associations</a></dd>
56
- <dd><a href="active_record_querying.html">Active Record Query Interface</a></dd>
57
- <dt>Views</dt>
58
- <dd><a href="layouts_and_rendering.html">Layouts and Rendering in Rails</a></dd>
59
- <dd><a href="form_helpers.html">Action View Form Helpers</a></dd>
60
- <dt>Controllers</dt>
61
- <dd><a href="action_controller_overview.html">Action Controller Overview</a></dd>
62
- <dd><a href="routing.html">Rails Routing from the Outside In</a></dd>
63
- </dl>
64
- <dl class="R">
65
- <dt>Digging Deeper</dt>
66
- <dd><a href="active_support_core_extensions.html">Active Support Core Extensions</a></dd>
67
- <dd><a href="i18n.html">Rails Internationalization API</a></dd>
68
- <dd><a href="action_mailer_basics.html">Action Mailer Basics</a></dd>
69
- <dd><a href="active_job_basics.html">Active Job Basics</a></dd>
70
- <dd><a href="security.html">Securing Rails Applications</a></dd>
71
- <dd><a href="debugging_rails_applications.html">Debugging Rails Applications</a></dd>
72
- <dd><a href="configuring.html">Configuring Rails Applications</a></dd>
73
- <dd><a href="command_line.html">Rails Command Line Tools and Rake Tasks</a></dd>
74
- <dd><a href="asset_pipeline.html">Asset Pipeline</a></dd>
75
- <dd><a href="working_with_javascript_in_rails.html">Working with JavaScript in Rails</a></dd>
76
- <dt>Extending Rails</dt>
77
- <dd><a href="rails_on_rack.html">Rails on Rack</a></dd>
78
- <dd><a href="generators.html">Creating and Customizing Rails Generators</a></dd>
79
- <dt>Contributing to Ruby on Rails</dt>
80
- <dd><a href="contributing_to_ruby_on_rails.html">Contributing to Ruby on Rails</a></dd>
81
- <dd><a href="api_documentation_guidelines.html">API Documentation Guidelines</a></dd>
82
- <dd><a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</a></dd>
83
- <dt>Maintenance Policy</dt>
84
- <dd><a href="maintenance_policy.html">Maintenance Policy</a></dd>
85
- <dt>Release Notes</dt>
86
- <dd><a href="upgrading_ruby_on_rails.html">Upgrading Ruby on Rails</a></dd>
87
- <dd><a href="4_1_release_notes.html">Ruby on Rails 4.1 Release Notes</a></dd>
88
- <dd><a href="4_0_release_notes.html">Ruby on Rails 4.0 Release Notes</a></dd>
89
- <dd><a href="3_2_release_notes.html">Ruby on Rails 3.2 Release Notes</a></dd>
90
- <dd><a href="3_1_release_notes.html">Ruby on Rails 3.1 Release Notes</a></dd>
91
- <dd><a href="3_0_release_notes.html">Ruby on Rails 3.0 Release Notes</a></dd>
92
- <dd><a href="2_3_release_notes.html">Ruby on Rails 2.3 Release Notes</a></dd>
93
- <dd><a href="2_2_release_notes.html">Ruby on Rails 2.2 Release Notes</a></dd>
94
- </dl>
95
- </div>
96
- </li>
97
- <li><a class="nav-item" href="contributing_to_ruby_on_rails.html">Contribute</a></li>
98
- <li><a class="nav-item" href="credits.html">Credits</a></li>
99
- <li class="guides-index guides-index-small">
100
- <select class="guides-index-item nav-item">
101
- <option value="index.html">Guides Index</option>
102
- <optgroup label="Start Here">
103
- <option value="getting_started.html">Getting Started with Rails</option>
104
- </optgroup>
105
- <optgroup label="Models">
106
- <option value="active_record_basics.html">Active Record Basics</option>
107
- <option value="active_record_migrations.html">Active Record Migrations</option>
108
- <option value="active_record_validations.html">Active Record Validations</option>
109
- <option value="active_record_callbacks.html">Active Record Callbacks</option>
110
- <option value="association_basics.html">Active Record Associations</option>
111
- <option value="active_record_querying.html">Active Record Query Interface</option>
112
- </optgroup>
113
- <optgroup label="Views">
114
- <option value="layouts_and_rendering.html">Layouts and Rendering in Rails</option>
115
- <option value="form_helpers.html">Action View Form Helpers</option>
116
- </optgroup>
117
- <optgroup label="Controllers">
118
- <option value="action_controller_overview.html">Action Controller Overview</option>
119
- <option value="routing.html">Rails Routing from the Outside In</option>
120
- </optgroup>
121
- <optgroup label="Digging Deeper">
122
- <option value="active_support_core_extensions.html">Active Support Core Extensions</option>
123
- <option value="i18n.html">Rails Internationalization API</option>
124
- <option value="action_mailer_basics.html">Action Mailer Basics</option>
125
- <option value="active_job_basics.html">Active Job Basics</option>
126
- <option value="security.html">Securing Rails Applications</option>
127
- <option value="debugging_rails_applications.html">Debugging Rails Applications</option>
128
- <option value="configuring.html">Configuring Rails Applications</option>
129
- <option value="command_line.html">Rails Command Line Tools and Rake Tasks</option>
130
- <option value="asset_pipeline.html">Asset Pipeline</option>
131
- <option value="working_with_javascript_in_rails.html">Working with JavaScript in Rails</option>
132
- </optgroup>
133
- <optgroup label="Extending Rails">
134
- <option value="rails_on_rack.html">Rails on Rack</option>
135
- <option value="generators.html">Creating and Customizing Rails Generators</option>
136
- </optgroup>
137
- <optgroup label="Contributing to Ruby on Rails">
138
- <option value="contributing_to_ruby_on_rails.html">Contributing to Ruby on Rails</option>
139
- <option value="api_documentation_guidelines.html">API Documentation Guidelines</option>
140
- <option value="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</option>
141
- </optgroup>
142
- <optgroup label="Maintenance Policy">
143
- <option value="maintenance_policy.html">Maintenance Policy</option>
144
- </optgroup>
145
- <optgroup label="Release Notes">
146
- <option value="upgrading_ruby_on_rails.html">Upgrading Ruby on Rails</option>
147
- <option value="4_1_release_notes.html">Ruby on Rails 4.1 Release Notes</option>
148
- <option value="4_0_release_notes.html">Ruby on Rails 4.0 Release Notes</option>
149
- <option value="3_2_release_notes.html">Ruby on Rails 3.2 Release Notes</option>
150
- <option value="3_1_release_notes.html">Ruby on Rails 3.1 Release Notes</option>
151
- <option value="3_0_release_notes.html">Ruby on Rails 3.0 Release Notes</option>
152
- <option value="2_3_release_notes.html">Ruby on Rails 2.3 Release Notes</option>
153
- <option value="2_2_release_notes.html">Ruby on Rails 2.2 Release Notes</option>
154
- </optgroup>
155
- </select>
156
- </li>
157
- </ul>
158
- </div>
159
- </div>
160
- <hr class="hide" />
161
-
162
- <div id="feature">
163
- <div class="wrapper">
164
- <h2>Ruby on Rails 2.2 Release Notes</h2><p>Rails 2.2 delivers a number of new and improved features. This list covers the major upgrades, but doesn&#39;t include every little bug fix and change. If you want to see everything, check out the <a href="http://github.com/rails/rails/commits/master">list of commits</a> in the main Rails repository on GitHub.</p><p>Along with Rails, 2.2 marks the launch of the <a href="http://guides.rubyonrails.org/">Ruby on Rails Guides</a>, the first results of the ongoing <a href="http://hackfest.rubyonrails.org/guide">Rails Guides hackfest</a>. This site will deliver high-quality documentation of the major features of Rails.</p>
165
-
166
- <div id="subCol">
167
- <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
168
- <ol class="chapters">
169
- <li>
170
- <a href="#infrastructure">Infrastructure</a>
171
-
172
- <ul>
173
- <li><a href="#internationalization">Internationalization</a></li>
174
- <li><a href="#compatibility-with-ruby-1.9-and-jruby">Compatibility with Ruby 1.9 and JRuby</a></li>
175
- </ul>
176
- </li>
177
- <li><a href="#documentation">Documentation</a></li>
178
- <li><a href="#better-integration-with-http-:-out-of-the-box-etag-support">Better integration with HTTP : Out of the box ETag support</a></li>
179
- <li><a href="#thread-safety">Thread Safety</a></li>
180
- <li>
181
- <a href="#active-record">Active Record</a>
182
-
183
- <ul>
184
- <li><a href="#transactional-migrations">Transactional Migrations</a></li>
185
- <li><a href="#connection-pooling">Connection Pooling</a></li>
186
- <li><a href="#hashes-for-join-table-conditions">Hashes for Join Table Conditions</a></li>
187
- <li><a href="#new-dynamic-finders">New Dynamic Finders</a></li>
188
- <li><a href="#associations-respect-private/protected-scope">Associations Respect Private/Protected Scope</a></li>
189
- <li><a href="#other-active-record-changes">Other Active Record Changes</a></li>
190
- </ul>
191
- </li>
192
- <li>
193
- <a href="#action-controller">Action Controller</a>
194
-
195
- <ul>
196
- <li><a href="#shallow-route-nesting">Shallow Route Nesting</a></li>
197
- <li><a href="#method-arrays-for-member-or-collection-routes">Method Arrays for Member or Collection Routes</a></li>
198
- <li><a href="#resources-with-specific-actions">Resources With Specific Actions</a></li>
199
- <li><a href="#other-action-controller-changes">Other Action Controller Changes</a></li>
200
- </ul>
201
- </li>
202
- <li><a href="#action-view">Action View</a></li>
203
- <li><a href="#action-mailer">Action Mailer</a></li>
204
- <li>
205
- <a href="#active-support">Active Support</a>
206
-
207
- <ul>
208
- <li><a href="#memoization">Memoization</a></li>
209
- <li><a href="#each_with_object">each_with_object</a></li>
210
- <li><a href="#delegates-with-prefixes">Delegates With Prefixes</a></li>
211
- <li><a href="#other-active-support-changes">Other Active Support Changes</a></li>
212
- </ul>
213
- </li>
214
- <li>
215
- <a href="#railties">Railties</a>
216
-
217
- <ul>
218
- <li><a href="#config.gems">config.gems</a></li>
219
- <li><a href="#other-railties-changes">Other Railties Changes</a></li>
220
- </ul>
221
- </li>
222
- <li><a href="#deprecated">Deprecated</a></li>
223
- <li><a href="#credits">Credits</a></li>
224
- </ol>
225
-
226
- </div>
227
-
228
- </div>
229
- </div>
230
-
231
- <div id="container">
232
- <div class="wrapper">
233
- <div id="mainCol">
234
- <h3 id="infrastructure">1 Infrastructure</h3><p>Rails 2.2 is a significant release for the infrastructure that keeps Rails humming along and connected to the rest of the world.</p><h4 id="internationalization">1.1 Internationalization</h4><p>Rails 2.2 supplies an easy system for internationalization (or i18n, for those of you tired of typing).</p>
235
- <ul>
236
- <li>Lead Contributors: Rails i18 Team</li>
237
- <li>More information :
238
-
239
- <ul>
240
- <li><a href="http://rails-i18n.org">Official Rails i18 website</a></li>
241
- <li><a href="http://www.artweb-design.de/2008/7/18/finally-ruby-on-rails-gets-internationalized">Finally. Ruby on Rails gets internationalized</a></li>
242
- <li><a href="http://github.com/clemens/i18n_demo_app">Localizing Rails : Demo application</a></li>
243
- </ul>
244
- </li>
245
- </ul>
246
- <h4 id="compatibility-with-ruby-1.9-and-jruby">1.2 Compatibility with Ruby 1.9 and JRuby</h4><p>Along with thread safety, a lot of work has been done to make Rails work well with JRuby and the upcoming Ruby 1.9. With Ruby 1.9 being a moving target, running edge Rails on edge Ruby is still a hit-or-miss proposition, but Rails is ready to make the transition to Ruby 1.9 when the latter is released.</p><h3 id="documentation">2 Documentation</h3><p>The internal documentation of Rails, in the form of code comments, has been improved in numerous places. In addition, the <a href="http://guides.rubyonrails.org/">Ruby on Rails Guides</a> project is the definitive source for information on major Rails components. In its first official release, the Guides page includes:</p>
247
- <ul>
248
- <li><a href="getting_started.html">Getting Started with Rails</a></li>
249
- <li><a href="migrations.html">Rails Database Migrations</a></li>
250
- <li><a href="association_basics.html">Active Record Associations</a></li>
251
- <li><a href="active_record_querying.html">Active Record Query Interface</a></li>
252
- <li><a href="layouts_and_rendering.html">Layouts and Rendering in Rails</a></li>
253
- <li><a href="form_helpers.html">Action View Form Helpers</a></li>
254
- <li><a href="routing.html">Rails Routing from the Outside In</a></li>
255
- <li><a href="action_controller_overview.html">Action Controller Overview</a></li>
256
- <li><a href="caching_with_rails.html">Rails Caching</a></li>
257
- <li><a href="testing.html">A Guide to Testing Rails Applications</a></li>
258
- <li><a href="security.html">Securing Rails Applications</a></li>
259
- <li><a href="debugging_rails_applications.html">Debugging Rails Applications</a></li>
260
- <li><a href="performance_testing.html">Performance Testing Rails Applications</a></li>
261
- <li><a href="plugins.html">The Basics of Creating Rails Plugins</a></li>
262
- </ul>
263
- <p>All told, the Guides provide tens of thousands of words of guidance for beginning and intermediate Rails developers.</p><p>If you want to generate these guides locally, inside your application:</p><div class="code_container">
264
- <pre class="brush: plain; gutter: false; toolbar: false">
265
- rake doc:guides
266
-
267
- </pre>
268
- </div>
269
- <p>This will put the guides inside <code>Rails.root/doc/guides</code> and you may start surfing straight away by opening <code>Rails.root/doc/guides/index.html</code> in your favourite browser.</p>
270
- <ul>
271
- <li>Lead Contributors: <a href="credits.html">Rails Documentation Team</a>
272
- </li>
273
- <li>Major contributions from <a href="http://izumi.plan99.net/blog/.">Xavier Noria":http://advogato.org/person/fxn/diary.html and "Hongli Lai</a>
274
- </li>
275
- <li>More information:
276
-
277
- <ul>
278
- <li><a href="http://hackfest.rubyonrails.org/guide">Rails Guides hackfest</a></li>
279
- <li><a href="http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch">Help improve Rails documentation on Git branch</a></li>
280
- </ul>
281
- </li>
282
- </ul>
283
- <h3 id="better-integration-with-http-:-out-of-the-box-etag-support">3 Better integration with HTTP : Out of the box ETag support</h3><p>Supporting the etag and last modified timestamp in HTTP headers means that Rails can now send back an empty response if it gets a request for a resource that hasn't been modified lately. This allows you to check whether a response needs to be sent at all.</p><div class="code_container">
284
- <pre class="brush: ruby; gutter: false; toolbar: false">
285
- class ArticlesController &lt; ApplicationController
286
- def show_with_respond_to_block
287
- @article = Article.find(params[:id])
288
-
289
- # If the request sends headers that differs from the options provided to stale?, then
290
- # the request is indeed stale and the respond_to block is triggered (and the options
291
- # to the stale? call is set on the response).
292
- #
293
- # If the request headers match, then the request is fresh and the respond_to block is
294
- # not triggered. Instead the default render will occur, which will check the last-modified
295
- # and etag headers and conclude that it only needs to send a "304 Not Modified" instead
296
- # of rendering the template.
297
- if stale?(:last_modified =&gt; @article.published_at.utc, :etag =&gt; @article)
298
- respond_to do |wants|
299
- # normal response processing
300
- end
301
- end
302
- end
303
-
304
- def show_with_implied_render
305
- @article = Article.find(params[:id])
306
-
307
- # Sets the response headers and checks them against the request, if the request is stale
308
- # (i.e. no match of either etag or last-modified), then the default render of the template happens.
309
- # If the request is fresh, then the default render will return a "304 Not Modified"
310
- # instead of rendering the template.
311
- fresh_when(:last_modified =&gt; @article.published_at.utc, :etag =&gt; @article)
312
- end
313
- end
314
-
315
- </pre>
316
- </div>
317
- <h3 id="thread-safety">4 Thread Safety</h3><p>The work done to make Rails thread-safe is rolling out in Rails 2.2. Depending on your web server infrastructure, this means you can handle more requests with fewer copies of Rails in memory, leading to better server performance and higher utilization of multiple cores.</p><p>To enable multithreaded dispatching in production mode of your application, add the following line in your <code>config/environments/production.rb</code>:</p><div class="code_container">
318
- <pre class="brush: ruby; gutter: false; toolbar: false">
319
- config.threadsafe!
320
-
321
- </pre>
322
- </div>
323
-
324
- <ul>
325
- <li>More information :
326
-
327
- <ul>
328
- <li><a href="http://m.onkey.org/2008/10/23/thread-safety-for-your-rails">Thread safety for your Rails</a></li>
329
- <li><a href="http://weblog.rubyonrails.org/2008/8/16/josh-peek-officially-joins-the-rails-core">Thread safety project announcement</a></li>
330
- <li><a href="http://blog.headius.com/2008/08/qa-what-thread-safe-rails-means.html">Q/A: What Thread-safe Rails Means</a></li>
331
- </ul>
332
- </li>
333
- </ul>
334
- <h3 id="active-record">5 Active Record</h3><p>There are two big additions to talk about here: transactional migrations and pooled database transactions. There's also a new (and cleaner) syntax for join table conditions, as well as a number of smaller improvements.</p><h4 id="transactional-migrations">5.1 Transactional Migrations</h4><p>Historically, multiple-step Rails migrations have been a source of trouble. If something went wrong during a migration, everything before the error changed the database and everything after the error wasn't applied. Also, the migration version was stored as having been executed, which means that it couldn't be simply rerun by <code>rake db:migrate:redo</code> after you fix the problem. Transactional migrations change this by wrapping migration steps in a DDL transaction, so that if any of them fail, the entire migration is undone. In Rails 2.2, transactional migrations are supported on PostgreSQL out of the box. The code is extensible to other database types in the future - and IBM has already extended it to support the DB2 adapter.</p>
335
- <ul>
336
- <li>Lead Contributor: <a href="http://adam.heroku.com/">Adam Wiggins</a>
337
- </li>
338
- <li>More information:
339
-
340
- <ul>
341
- <li><a href="http://adam.heroku.com/past/2008/9/3/ddl_transactions/">DDL Transactions</a></li>
342
- <li><a href="http://db2onrails.com/2008/11/08/a-major-milestone-for-db2-on-rails/">A major milestone for DB2 on Rails</a></li>
343
- </ul>
344
- </li>
345
- </ul>
346
- <h4 id="connection-pooling">5.2 Connection Pooling</h4><p>Connection pooling lets Rails distribute database requests across a pool of database connections that will grow to a maximum size (by default 5, but you can add a <code>pool</code> key to your <code>database.yml</code> to adjust this). This helps remove bottlenecks in applications that support many concurrent users. There's also a <code>wait_timeout</code> that defaults to 5 seconds before giving up. <code>ActiveRecord::Base.connection_pool</code> gives you direct access to the pool if you need it.</p><div class="code_container">
347
- <pre class="brush: plain; gutter: false; toolbar: false">
348
- development:
349
- adapter: mysql
350
- username: root
351
- database: sample_development
352
- pool: 10
353
- wait_timeout: 10
354
-
355
- </pre>
356
- </div>
357
-
358
- <ul>
359
- <li>Lead Contributor: <a href="http://blog.nicksieger.com/">Nick Sieger</a>
360
- </li>
361
- <li>More information:
362
-
363
- <ul>
364
- <li><a href="http://ryandaigle.com/articles/2008/9/7/what-s-new-in-edge-rails-connection-pools">What's New in Edge Rails: Connection Pools</a></li>
365
- </ul>
366
- </li>
367
- </ul>
368
- <h4 id="hashes-for-join-table-conditions">5.3 Hashes for Join Table Conditions</h4><p>You can now specify conditions on join tables using a hash. This is a big help if you need to query across complex joins.</p><div class="code_container">
369
- <pre class="brush: ruby; gutter: false; toolbar: false">
370
- class Photo &lt; ActiveRecord::Base
371
- belongs_to :product
372
- end
373
-
374
- class Product &lt; ActiveRecord::Base
375
- has_many :photos
376
- end
377
-
378
- # Get all products with copyright-free photos:
379
- Product.all(:joins =&gt; :photos, :conditions =&gt; { :photos =&gt; { :copyright =&gt; false }})
380
-
381
- </pre>
382
- </div>
383
-
384
- <ul>
385
- <li>More information:
386
-
387
- <ul>
388
- <li><a href="http://ryandaigle.com/articles/2008/7/7/what-s-new-in-edge-rails-easy-join-table-conditions">What's New in Edge Rails: Easy Join Table Conditions</a></li>
389
- </ul>
390
- </li>
391
- </ul>
392
- <h4 id="new-dynamic-finders">5.4 New Dynamic Finders</h4><p>Two new sets of methods have been added to Active Record's dynamic finders family.</p><h5 id="find_last_by_attribute">5.4.1 <code>find_last_by_attribute</code>
393
- </h5><p>The <code>find_last_by_attribute</code> method is equivalent to <code>Model.last(:conditions =&gt; {:attribute =&gt; value})</code></p><div class="code_container">
394
- <pre class="brush: ruby; gutter: false; toolbar: false">
395
- # Get the last user who signed up from London
396
- User.find_last_by_city('London')
397
-
398
- </pre>
399
- </div>
400
-
401
- <ul>
402
- <li>Lead Contributor: <a href="http://www.workingwithrails.com/person/9147-emilio-tagua">Emilio Tagua</a>
403
- </li>
404
- </ul>
405
- <h5 id="find_by_attribute-bang">5.4.2 <code>find_by_attribute!</code>
406
- </h5><p>The new bang! version of <code>find_by_attribute!</code> is equivalent to <code>Model.first(:conditions =&gt; {:attribute =&gt; value}) || raise ActiveRecord::RecordNotFound</code> Instead of returning <code>nil</code> if it can't find a matching record, this method will raise an exception if it cannot find a match.</p><div class="code_container">
407
- <pre class="brush: ruby; gutter: false; toolbar: false">
408
- # Raise ActiveRecord::RecordNotFound exception if 'Moby' hasn't signed up yet!
409
- User.find_by_name!('Moby')
410
-
411
- </pre>
412
- </div>
413
-
414
- <ul>
415
- <li>Lead Contributor: <a href="http://blog.hasmanythrough.com">Josh Susser</a>
416
- </li>
417
- </ul>
418
- <h4 id="associations-respect-private/protected-scope">5.5 Associations Respect Private/Protected Scope</h4><p>Active Record association proxies now respect the scope of methods on the proxied object. Previously (given User has_one :account) <code>@user.account.private_method</code> would call the private method on the associated Account object. That fails in Rails 2.2; if you need this functionality, you should use <code>@user.account.send(:private_method)</code> (or make the method public instead of private or protected). Please note that if you're overriding <code>method_missing</code>, you should also override <code>respond_to</code> to match the behavior in order for associations to function normally.</p>
419
- <ul>
420
- <li>Lead Contributor: Adam Milligan</li>
421
- <li>More information:
422
-
423
- <ul>
424
- <li><a href="http://afreshcup.com/2008/10/24/rails-22-change-private-methods-on-association-proxies-are-private/">Rails 2.2 Change: Private Methods on Association Proxies are Private</a></li>
425
- </ul>
426
- </li>
427
- </ul>
428
- <h4 id="other-active-record-changes">5.6 Other Active Record Changes</h4>
429
- <ul>
430
- <li>
431
- <code>rake db:migrate:redo</code> now accepts an optional VERSION to target that specific migration to redo</li>
432
- <li>Set <code>config.active_record.timestamped_migrations = false</code> to have migrations with numeric prefix instead of UTC timestamp.</li>
433
- <li>Counter cache columns (for associations declared with <code>:counter_cache =&gt; true</code>) do not need to be initialized to zero any longer.</li>
434
- <li>
435
- <code>ActiveRecord::Base.human_name</code> for an internationalization-aware humane translation of model names</li>
436
- </ul>
437
- <h3 id="action-controller">6 Action Controller</h3><p>On the controller side, there are several changes that will help tidy up your routes. There are also some internal changes in the routing engine to lower memory usage on complex applications.</p><h4 id="shallow-route-nesting">6.1 Shallow Route Nesting</h4><p>Shallow route nesting provides a solution to the well-known difficulty of using deeply-nested resources. With shallow nesting, you need only supply enough information to uniquely identify the resource that you want to work with.</p><div class="code_container">
438
- <pre class="brush: ruby; gutter: false; toolbar: false">
439
- map.resources :publishers, :shallow =&gt; true do |publisher|
440
- publisher.resources :magazines do |magazine|
441
- magazine.resources :photos
442
- end
443
- end
444
-
445
- </pre>
446
- </div>
447
- <p>This will enable recognition of (among others) these routes:</p><div class="code_container">
448
- <pre class="brush: plain; gutter: false; toolbar: false">
449
- /publishers/1 ==&gt; publisher_path(1)
450
- /publishers/1/magazines ==&gt; publisher_magazines_path(1)
451
- /magazines/2 ==&gt; magazine_path(2)
452
- /magazines/2/photos ==&gt; magazines_photos_path(2)
453
- /photos/3 ==&gt; photo_path(3)
454
-
455
- </pre>
456
- </div>
457
-
458
- <ul>
459
- <li>Lead Contributor: <a href="http://www.unwwwired.net/">S. Brent Faulkner</a>
460
- </li>
461
- <li>More information:
462
-
463
- <ul>
464
- <li><a href="routing.html#nested-resources">Rails Routing from the Outside In</a></li>
465
- <li><a href="http://ryandaigle.com/articles/2008/9/7/what-s-new-in-edge-rails-shallow-routes">What's New in Edge Rails: Shallow Routes</a></li>
466
- </ul>
467
- </li>
468
- </ul>
469
- <h4 id="method-arrays-for-member-or-collection-routes">6.2 Method Arrays for Member or Collection Routes</h4><p>You can now supply an array of methods for new member or collection routes. This removes the annoyance of having to define a route as accepting any verb as soon as you need it to handle more than one. With Rails 2.2, this is a legitimate route declaration:</p><div class="code_container">
470
- <pre class="brush: ruby; gutter: false; toolbar: false">
471
- map.resources :photos, :collection =&gt; { :search =&gt; [:get, :post] }
472
-
473
- </pre>
474
- </div>
475
-
476
- <ul>
477
- <li>Lead Contributor: <a href="http://brennandunn.com/">Brennan Dunn</a>
478
- </li>
479
- </ul>
480
- <h4 id="resources-with-specific-actions">6.3 Resources With Specific Actions</h4><p>By default, when you use <code>map.resources</code> to create a route, Rails generates routes for seven default actions (index, show, create, new, edit, update, and destroy). But each of these routes takes up memory in your application, and causes Rails to generate additional routing logic. Now you can use the <code>:only</code> and <code>:except</code> options to fine-tune the routes that Rails will generate for resources. You can supply a single action, an array of actions, or the special <code>:all</code> or <code>:none</code> options. These options are inherited by nested resources.</p><div class="code_container">
481
- <pre class="brush: ruby; gutter: false; toolbar: false">
482
- map.resources :photos, :only =&gt; [:index, :show]
483
- map.resources :products, :except =&gt; :destroy
484
-
485
- </pre>
486
- </div>
487
-
488
- <ul>
489
- <li>Lead Contributor: <a href="http://experthuman.com/">Tom Stuart</a>
490
- </li>
491
- </ul>
492
- <h4 id="other-action-controller-changes">6.4 Other Action Controller Changes</h4>
493
- <ul>
494
- <li>You can now easily <a href="http://m.onkey.org/2008/7/20/rescue-from-dispatching">show a custom error page</a> for exceptions raised while routing a request.</li>
495
- <li>The HTTP Accept header is disabled by default now. You should prefer the use of formatted URLs (such as <code>/customers/1.xml</code>) to indicate the format that you want. If you need the Accept headers, you can turn them back on with <code>config.action_controller.use_accept_header = true</code>.</li>
496
- <li>Benchmarking numbers are now reported in milliseconds rather than tiny fractions of seconds</li>
497
- <li>Rails now supports HTTP-only cookies (and uses them for sessions), which help mitigate some cross-site scripting risks in newer browsers.</li>
498
- <li>
499
- <code>redirect_to</code> now fully supports URI schemes (so, for example, you can redirect to a svn`ssh: URI).</li>
500
- <li>
501
- <code>render</code> now supports a <code>:js</code> option to render plain vanilla JavaScript with the right mime type.</li>
502
- <li>Request forgery protection has been tightened up to apply to HTML-formatted content requests only.</li>
503
- <li>Polymorphic URLs behave more sensibly if a passed parameter is nil. For example, calling <code>polymorphic_path([@project, @date, @area])</code> with a nil date will give you <code>project_area_path</code>.</li>
504
- </ul>
505
- <h3 id="action-view">7 Action View</h3>
506
- <ul>
507
- <li>
508
- <code>javascript_include_tag</code> and <code>stylesheet_link_tag</code> support a new <code>:recursive</code> option to be used along with <code>:all</code>, so that you can load an entire tree of files with a single line of code.</li>
509
- <li>The included Prototype JavaScript library has been upgraded to version 1.6.0.3.</li>
510
- <li>
511
- <code>RJS#page.reload</code> to reload the browser's current location via JavaScript</li>
512
- <li>The <code>atom_feed</code> helper now takes an <code>:instruct</code> option to let you insert XML processing instructions.</li>
513
- </ul>
514
- <h3 id="action-mailer">8 Action Mailer</h3><p>Action Mailer now supports mailer layouts. You can make your HTML emails as pretty as your in-browser views by supplying an appropriately-named layout - for example, the <code>CustomerMailer</code> class expects to use <code>layouts/customer_mailer.html.erb</code>.</p>
515
- <ul>
516
- <li>More information:
517
-
518
- <ul>
519
- <li><a href="http://ryandaigle.com/articles/2008/9/7/what-s-new-in-edge-rails-mailer-layouts">What's New in Edge Rails: Mailer Layouts</a></li>
520
- </ul>
521
- </li>
522
- </ul>
523
- <p>Action Mailer now offers built-in support for GMail's SMTP servers, by turning on STARTTLS automatically. This requires Ruby 1.8.7 to be installed.</p><h3 id="active-support">9 Active Support</h3><p>Active Support now offers built-in memoization for Rails applications, the <code>each_with_object</code> method, prefix support on delegates, and various other new utility methods.</p><h4 id="memoization">9.1 Memoization</h4><p>Memoization is a pattern of initializing a method once and then stashing its value away for repeat use. You've probably used this pattern in your own applications:</p><div class="code_container">
524
- <pre class="brush: ruby; gutter: false; toolbar: false">
525
- def full_name
526
- @full_name ||= "#{first_name} #{last_name}"
527
- end
528
-
529
- </pre>
530
- </div>
531
- <p>Memoization lets you handle this task in a declarative fashion:</p><div class="code_container">
532
- <pre class="brush: ruby; gutter: false; toolbar: false">
533
- extend ActiveSupport::Memoizable
534
-
535
- def full_name
536
- "#{first_name} #{last_name}"
537
- end
538
- memoize :full_name
539
-
540
- </pre>
541
- </div>
542
- <p>Other features of memoization include <code>unmemoize</code>, <code>unmemoize_all</code>, and <code>memoize_all</code> to turn memoization on or off.</p>
543
- <ul>
544
- <li>Lead Contributor: <a href="http://joshpeek.com/">Josh Peek</a>
545
- </li>
546
- <li>More information:
547
-
548
- <ul>
549
- <li><a href="http://ryandaigle.com/articles/2008/7/16/what-s-new-in-edge-rails-memoization">What's New in Edge Rails: Easy Memoization</a></li>
550
- <li><a href="http://www.railway.at/articles/2008/09/20/a-guide-to-memoization">Memo-what? A Guide to Memoization</a></li>
551
- </ul>
552
- </li>
553
- </ul>
554
- <h4 id="each_with_object">9.2 each_with_object</h4><p>The <code>each_with_object</code> method provides an alternative to <code>inject</code>, using a method backported from Ruby 1.9. It iterates over a collection, passing the current element and the memo into the block.</p><div class="code_container">
555
- <pre class="brush: ruby; gutter: false; toolbar: false">
556
- %w(foo bar).each_with_object({}) { |str, hsh| hsh[str] = str.upcase } # =&gt; {'foo' =&gt; 'FOO', 'bar' =&gt; 'BAR'}
557
-
558
- </pre>
559
- </div>
560
- <p>Lead Contributor: <a href="http://therealadam.com/">Adam Keys</a></p><h4 id="delegates-with-prefixes">9.3 Delegates With Prefixes</h4><p>If you delegate behavior from one class to another, you can now specify a prefix that will be used to identify the delegated methods. For example:</p><div class="code_container">
561
- <pre class="brush: ruby; gutter: false; toolbar: false">
562
- class Vendor &lt; ActiveRecord::Base
563
- has_one :account
564
- delegate :email, :password, :to =&gt; :account, :prefix =&gt; true
565
- end
566
-
567
- </pre>
568
- </div>
569
- <p>This will produce delegated methods <code>vendor#account_email</code> and <code>vendor#account_password</code>. You can also specify a custom prefix:</p><div class="code_container">
570
- <pre class="brush: ruby; gutter: false; toolbar: false">
571
- class Vendor &lt; ActiveRecord::Base
572
- has_one :account
573
- delegate :email, :password, :to =&gt; :account, :prefix =&gt; :owner
574
- end
575
-
576
- </pre>
577
- </div>
578
- <p>This will produce delegated methods <code>vendor#owner_email</code> and <code>vendor#owner_password</code>.</p><p>Lead Contributor: <a href="http://workingwithrails.com/person/5830-daniel-schierbeck">Daniel Schierbeck</a></p><h4 id="other-active-support-changes">9.4 Other Active Support Changes</h4>
579
- <ul>
580
- <li>Extensive updates to <code>ActiveSupport::Multibyte</code>, including Ruby 1.9 compatibility fixes.</li>
581
- <li>The addition of <code>ActiveSupport::Rescuable</code> allows any class to mix in the <code>rescue_from</code> syntax.</li>
582
- <li>
583
- <code>past?</code>, <code>today?</code> and <code>future?</code> for <code>Date</code> and <code>Time</code> classes to facilitate date/time comparisons.</li>
584
- <li>
585
- <code>Array#second</code> through <code>Array#fifth</code> as aliases for <code>Array#[1]</code> through <code>Array#[4]</code>
586
- </li>
587
- <li>
588
- <code>Enumerable#many?</code> to encapsulate <code>collection.size &gt; 1</code>
589
- </li>
590
- <li>
591
- <code>Inflector#parameterize</code> produces a URL-ready version of its input, for use in <code>to_param</code>.</li>
592
- <li>
593
- <code>Time#advance</code> recognizes fractional days and weeks, so you can do <code>1.7.weeks.ago</code>, <code>1.5.hours.since</code>, and so on.</li>
594
- <li>The included TzInfo library has been upgraded to version 0.3.12.</li>
595
- <li>
596
- <code>ActiveSupport::StringInquirer</code> gives you a pretty way to test for equality in strings: <code>ActiveSupport::StringInquirer.new("abc").abc? =&gt; true</code>
597
- </li>
598
- </ul>
599
- <h3 id="railties">10 Railties</h3><p>In Railties (the core code of Rails itself) the biggest changes are in the <code>config.gems</code> mechanism.</p><h4 id="config.gems">10.1 config.gems</h4><p>To avoid deployment issues and make Rails applications more self-contained, it's possible to place copies of all of the gems that your Rails application requires in <code>/vendor/gems</code>. This capability first appeared in Rails 2.1, but it's much more flexible and robust in Rails 2.2, handling complicated dependencies between gems. Gem management in Rails includes these commands:</p>
600
- <ul>
601
- <li>
602
- <code>config.gem _gem_name_</code> in your <code>config/environment.rb</code> file</li>
603
- <li>
604
- <code>rake gems</code> to list all configured gems, as well as whether they (and their dependencies) are installed, frozen, or framework (framework gems are those loaded by Rails before the gem dependency code is executed; such gems cannot be frozen)</li>
605
- <li>
606
- <code>rake gems:install</code> to install missing gems to the computer</li>
607
- <li>
608
- <code>rake gems:unpack</code> to place a copy of the required gems into <code>/vendor/gems</code>
609
- </li>
610
- <li>
611
- <code>rake gems:unpack:dependencies</code> to get copies of the required gems and their dependencies into <code>/vendor/gems</code>
612
- </li>
613
- <li>
614
- <code>rake gems:build</code> to build any missing native extensions</li>
615
- <li>
616
- <code>rake gems:refresh_specs</code> to bring vendored gems created with Rails 2.1 into alignment with the Rails 2.2 way of storing them</li>
617
- </ul>
618
- <p>You can unpack or install a single gem by specifying <code>GEM=_gem_name_</code> on the command line.</p>
619
- <ul>
620
- <li>Lead Contributor: <a href="http://github.com/al2o3cr">Matt Jones</a>
621
- </li>
622
- <li>More information:
623
-
624
- <ul>
625
- <li><a href="http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies">What's New in Edge Rails: Gem Dependencies</a></li>
626
- <li><a href="http://afreshcup.com/2008/10/25/rails-212-and-22rc1-update-your-rubygems/">Rails 2.1.2 and 2.2RC1: Update Your RubyGems</a></li>
627
- <li><a href="http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1128">Detailed discussion on Lighthouse</a></li>
628
- </ul>
629
- </li>
630
- </ul>
631
- <h4 id="other-railties-changes">10.2 Other Railties Changes</h4>
632
- <ul>
633
- <li>If you're a fan of the <a href="http://code.macournoyer.com/thin/">Thin</a> web server, you'll be happy to know that <code>script/server</code> now supports Thin directly.</li>
634
- <li>
635
- <code>script/plugin install &amp;lt;plugin&amp;gt; -r &amp;lt;revision&amp;gt;</code> now works with git-based as well as svn-based plugins.</li>
636
- <li>
637
- <code>script/console</code> now supports a <code>--debugger</code> option</li>
638
- <li>Instructions for setting up a continuous integration server to build Rails itself are included in the Rails source</li>
639
- <li>
640
- <code>rake notes:custom ANNOTATION=MYFLAG</code> lets you list out custom annotations.</li>
641
- <li>Wrapped <code>Rails.env</code> in <code>StringInquirer</code> so you can do <code>Rails.env.development?</code>
642
- </li>
643
- <li>To eliminate deprecation warnings and properly handle gem dependencies, Rails now requires rubygems 1.3.1 or higher.</li>
644
- </ul>
645
- <h3 id="deprecated">11 Deprecated</h3><p>A few pieces of older code are deprecated in this release:</p>
646
- <ul>
647
- <li>
648
- <code>Rails::SecretKeyGenerator</code> has been replaced by <code>ActiveSupport::SecureRandom</code>
649
- </li>
650
- <li>
651
- <code>render_component</code> is deprecated. There's a <a href="http://github.com/rails/render_component/tree/master">render_components plugin</a> available if you need this functionality.</li>
652
- <li>
653
- <p>Implicit local assignments when rendering partials has been deprecated.</p>
654
- <div class="code_container">
655
- <pre class="brush: ruby; gutter: false; toolbar: false">
656
- def partial_with_implicit_local_assignment
657
- @customer = Customer.new("Marcel")
658
- render :partial =&gt; "customer"
659
- end
660
-
661
- </pre>
662
- </div>
663
- <p>Previously the above code made available a local variable called <code>customer</code> inside the partial 'customer'. You should explicitly pass all the variables via :locals hash now.</p>
664
- </li>
665
- <li><p><code>country_select</code> has been removed. See the <a href="http://www.rubyonrails.org/deprecation/list-of-countries">deprecation page</a> for more information and a plugin replacement.</p></li>
666
- <li><p><code>ActiveRecord::Base.allow_concurrency</code> no longer has any effect.</p></li>
667
- <li><p><code>ActiveRecord::Errors.default_error_messages</code> has been deprecated in favor of <code>I18n.translate('activerecord.errors.messages')</code></p></li>
668
- <li><p>The <code>%s</code> and <code>%d</code> interpolation syntax for internationalization is deprecated.</p></li>
669
- <li><p><code>String#chars</code> has been deprecated in favor of <code>String#mb_chars</code>.</p></li>
670
- <li><p>Durations of fractional months or fractional years are deprecated. Use Ruby's core <code>Date</code> and <code>Time</code> class arithmetic instead.</p></li>
671
- <li><p><code>Request#relative_url_root</code> is deprecated. Use <code>ActionController::Base.relative_url_root</code> instead.</p></li>
672
- </ul>
673
- <h3 id="credits">12 Credits</h3><p>Release notes compiled by <a href="http://afreshcup.com">Mike Gunderloy</a></p>
674
-
675
- <h3>Feedback</h3>
676
- <p>
677
- You're encouraged to help improve the quality of this guide.
678
- </p>
679
- <p>
680
- Please contribute if you see any typos or factual errors.
681
- To get started, you can read our <a href="http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-documentation">documentation contributions</a> section.
682
- </p>
683
- <p>
684
- You may also find incomplete content, or stuff that is not up to date.
685
- Please do add any missing documentation for master. Make sure to check
686
- <a href="http://edgeguides.rubyonrails.org">Edge Guides</a> first to verify
687
- if the issues are already fixed or not on the master branch.
688
- Check the <a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</a>
689
- for style and conventions.
690
- </p>
691
- <p>
692
- If for whatever reason you spot something to fix but cannot patch it yourself, please
693
- <a href="https://github.com/rails/rails/issues">open an issue</a>.
694
- </p>
695
- <p>And last but not least, any kind of discussion regarding Ruby on Rails
696
- documentation is very welcome in the <a href="http://groups.google.com/group/rubyonrails-docs">rubyonrails-docs mailing list</a>.
697
- </p>
698
- </div>
699
- </div>
700
- </div>
701
-
702
- <hr class="hide" />
703
- <div id="footer">
704
- <div class="wrapper">
705
- <p>This work is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a> License</p>
706
- <p>"Rails", "Ruby on Rails", and the Rails logo are trademarks of David Heinemeier Hansson. All rights reserved.</p>
707
-
708
- </div>
709
- </div>
710
-
711
- <script type="text/javascript" src="javascripts/jquery.min.js"></script>
712
- <script type="text/javascript" src="javascripts/responsive-tables.js"></script>
713
- <script type="text/javascript" src="javascripts/guides.js"></script>
714
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shCore.js"></script>
715
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushRuby.js"></script>
716
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushXml.js"></script>
717
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushSql.js"></script>
718
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushPlain.js"></script>
719
- <script type="text/javascript">
720
- SyntaxHighlighter.all();
721
- $(guidesIndex.bind);
722
- </script>
723
- </body>
724
- </html>