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
@@ -1,728 +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 4.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 4.2 Release Notes</h2><p>Highlights in Rails 4.2:</p>
165
- <ul>
166
- <li>Active Job, Action Mailer #deliver_later</li>
167
- <li>Adequate Record</li>
168
- <li>Web Console</li>
169
- <li>Foreign key support</li>
170
- </ul>
171
- <p>These release notes cover only the major changes. To know about various bug
172
- fixes and changes, please refer to the change logs or check out the
173
- <a href="https://github.com/rails/rails/commits/master">list of commits</a> in the main
174
- Rails repository on GitHub.</p>
175
-
176
- <div id="subCol">
177
- <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
178
- <ol class="chapters">
179
- <li><a href="#upgrading-to-rails-4.2">Upgrading to Rails 4.2</a></li>
180
- <li>
181
- <a href="#major-features">Major Features</a>
182
-
183
- <ul>
184
- <li><a href="#active-job,-action-mailer-#deliver_later">Active Job, Action Mailer #deliver_later</a></li>
185
- <li><a href="#adequate-record">Adequate Record</a></li>
186
- <li><a href="#web-console">Web Console</a></li>
187
- <li><a href="#foreign-key-support">Foreign key support</a></li>
188
- </ul>
189
- </li>
190
- <li>
191
- <a href="#railties">Railties</a>
192
-
193
- <ul>
194
- <li><a href="#railties-removals">Removals</a></li>
195
- <li><a href="#railties-deprecations">Deprecations</a></li>
196
- <li><a href="#railties-notable-changes">Notable changes</a></li>
197
- </ul>
198
- </li>
199
- <li>
200
- <a href="#action-pack">Action Pack</a>
201
-
202
- <ul>
203
- <li><a href="#action-pack-removals">Removals</a></li>
204
- <li><a href="#action-pack-deprecations">Deprecations</a></li>
205
- <li><a href="#action-pack-notable-changes">Notable changes</a></li>
206
- </ul>
207
- </li>
208
- <li>
209
- <a href="#action-view">Action View</a>
210
-
211
- <ul>
212
- <li><a href="#action-view-deprecations">Deprecations</a></li>
213
- <li><a href="#action-view-notable-changes">Notable changes</a></li>
214
- </ul>
215
- </li>
216
- <li>
217
- <a href="#action-mailer">Action Mailer</a>
218
-
219
- <ul>
220
- <li><a href="#action-mailer-deprecations">Deprecations</a></li>
221
- <li><a href="#action-mailer-notable-changes">Notable changes</a></li>
222
- </ul>
223
- </li>
224
- <li>
225
- <a href="#active-record">Active Record</a>
226
-
227
- <ul>
228
- <li><a href="#active-record-removals">Removals</a></li>
229
- <li><a href="#active-record-deprecations">Deprecations</a></li>
230
- <li><a href="#active-record-notable-changes">Notable changes</a></li>
231
- </ul>
232
- </li>
233
- <li>
234
- <a href="#active-model">Active Model</a>
235
-
236
- <ul>
237
- <li><a href="#active-model-removals">Removals</a></li>
238
- <li><a href="#active-model-deprecations">Deprecations</a></li>
239
- <li><a href="#active-model-notable-changes">Notable changes</a></li>
240
- </ul>
241
- </li>
242
- <li>
243
- <a href="#active-support">Active Support</a>
244
-
245
- <ul>
246
- <li><a href="#removals">Removals</a></li>
247
- <li><a href="#deprecations">Deprecations</a></li>
248
- <li><a href="#notable-changes">Notable changes</a></li>
249
- </ul>
250
- </li>
251
- <li><a href="#credits">Credits</a></li>
252
- </ol>
253
-
254
- </div>
255
-
256
- </div>
257
- </div>
258
-
259
- <div id="container">
260
- <div class="wrapper">
261
- <div id="mainCol">
262
- <div class="note"><p>This document is a work in progress, please help to improve this by sending
263
- a <a href="https://github.com/rails/rails/edit/master/guides/source/upgrading_ruby_on_rails.md">pull request</a>.</p></div><h3 id="upgrading-to-rails-4.2">1 Upgrading to Rails 4.2</h3><p>If you're upgrading an existing application, it's a great idea to have good test
264
- coverage before going in. You should also first upgrade to Rails 4.1 in case you
265
- haven't and make sure your application still runs as expected before attempting
266
- to upgrade to Rails 4.2. A list of things to watch out for when upgrading is
267
- available in the
268
- <a href="upgrading_ruby_on_rails.html#upgrading-from-rails-4.1-to-rails-4.2">Upgrading Ruby on Rails</a>
269
- guide.</p><h3 id="major-features">2 Major Features</h3><h4 id="active-job,-action-mailer-#deliver_later">2.1 Active Job, Action Mailer #deliver_later</h4><p>Active Job is a new framework in Rails 4.2. It is an adapter layer on top of
270
- queuing systems like Resque, Delayed Job, Sidekiq, and more. You can write your
271
- jobs to Active Job, and it'll run on all these queues with no changes. (It comes
272
- pre-configured with an inline runner.)</p><p>Building on top of Active Job, Action Mailer now comes with a #deliver_later
273
- method, which adds your email to be sent as a job to a queue, so it doesn't
274
- bog down the controller or model.</p><p>The new GlobalID library makes it easy to pass Active Record objects to jobs by
275
- serializing them in a generic form. This means you no longer have to manually
276
- pack and unpack your Active Records by passing ids. Just give the job the
277
- straight Active Record object, and it'll serialize it using GlobalID, and
278
- deserialize it at run time.</p><h4 id="adequate-record">2.2 Adequate Record</h4><p>Rails 4.2 comes with a performance improvement feature called Adequate Record
279
- for Active Record. A lot of common queries are now up to twice as fast in Rails
280
- 4.2!</p><div class="todo"><p>add some technical details</p></div><h4 id="web-console">2.3 Web Console</h4><p>New applications generated from Rails 4.2 now comes with the Web Console gem by
281
- default.</p><p>Web Console is an IRB console available in the browser. In development mode, you
282
- can go to /console and do your work right there. It will also be made available
283
- on all exception pages and allows you to jump between the different points in
284
- the backtrace.</p><h4 id="foreign-key-support">2.4 Foreign key support</h4><p>The migration DSL now supports adding and removing foreign keys. They are dumped
285
- to <code>schema.rb</code> as well. At this time, only the <code>mysql</code>, <code>mysql2</code> and <code>postgresql</code>
286
- adapters support foreign keys.</p><div class="code_container">
287
- <pre class="brush: ruby; gutter: false; toolbar: false">
288
- # add a foreign key to `articles.author_id` referencing `authors.id`
289
- add_foreign_key :articles, :authors
290
-
291
- # add a foreign key to `articles.author_id` referencing `users.lng_id`
292
- add_foreign_key :articles, :users, column: :author_id, primary_key: "lng_id"
293
-
294
- # remove the foreign key on `accounts.branch_id`
295
- remove_foreign_key :accounts, :branches
296
-
297
- # remove the foreign key on `accounts.owner_id`
298
- remove_foreign_key :accounts, column: :owner_id
299
-
300
- </pre>
301
- </div>
302
- <p>See the API documentation on
303
- <a href="http://api.rubyonrails.org/v4.2.0/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_foreign_key">add_foreign_key</a>
304
- and
305
- <a href="http://api.rubyonrails.org/v4.2.0/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-remove_foreign_key">remove_foreign_key</a>
306
- for a full description.</p><h3 id="railties">3 Railties</h3><p>Please refer to the <a href="https://github.com/rails/rails/blob/4-2-stable/railties/CHANGELOG.md">Changelog</a> for detailed changes.</p><h4 id="railties-removals">3.1 Removals</h4>
307
- <ul>
308
- <li> The <code>rails application</code> command has been removed without replacement.
309
- (<a href="https://github.com/rails/rails/pull/11616">Pull Request</a>)</li>
310
- </ul>
311
- <h4 id="railties-deprecations">3.2 Deprecations</h4>
312
- <ul>
313
- <li> Deprecated <code>Rails::Rack::LogTailer</code> without replacement.
314
- (<a href="https://github.com/rails/rails/commit/84a13e019e93efaa8994b3f8303d635a7702dbce">Commit</a>)</li>
315
- </ul>
316
- <h4 id="railties-notable-changes">3.3 Notable changes</h4>
317
- <ul>
318
- <li><p> Introduced <code>web-console</code> in the default application Gemfile.
319
- (<a href="https://github.com/rails/rails/pull/16532">Pull Request</a>)</p></li>
320
- <li><p> Added a <code>required</code> option to the model generator for associations.
321
- (<a href="https://github.com/rails/rails/pull/16062">Pull Request</a>)</p></li>
322
- <li><p> Introduced an <code>after_bundle</code> callback for use in Rails templates.
323
- (<a href="https://github.com/rails/rails/pull/16359">Pull Request</a>)</p></li>
324
- <li>
325
- <p> Introduced the <code>x</code> namespace for defining custom configuration options:</p>
326
- <div class="code_container">
327
- <pre class="brush: ruby; gutter: false; toolbar: false">
328
- # config/environments/production.rb
329
- config.x.payment_processing.schedule = :daily
330
- config.x.payment_processing.retries = 3
331
- config.x.super_debugger = true
332
-
333
- </pre>
334
- </div>
335
- <p>These options are then available through the configuration object:</p>
336
- <div class="code_container">
337
- <pre class="brush: ruby; gutter: false; toolbar: false">
338
- Rails.configuration.x.payment_processing.schedule # =&gt; :daily
339
- Rails.configuration.x.payment_processing.retries # =&gt; 3
340
- Rails.configuration.x.super_debugger # =&gt; true
341
-
342
- </pre>
343
- </div>
344
- <p>(<a href="https://github.com/rails/rails/commit/611849772dd66c2e4d005dcfe153f7ce79a8a7db">Commit</a>)</p>
345
- </li>
346
- <li>
347
- <p> Introduced <code>Rails::Application.config_for</code> to load a configuration for the
348
- current environment.</p>
349
- <div class="code_container">
350
- <pre class="brush: ruby; gutter: false; toolbar: false">
351
- # config/exception_notification.yml:
352
- production:
353
- url: http://127.0.0.1:8080
354
- namespace: my_app_production
355
- development:
356
- url: http://localhost:3001
357
- namespace: my_app_development
358
-
359
- # config/production.rb
360
- MyApp::Application.configure do
361
- config.middleware.use ExceptionNotifier, config_for(:exception_notification)
362
- end
363
-
364
- </pre>
365
- </div>
366
- <p>(<a href="https://github.com/rails/rails/pull/16129">Pull Request</a>)</p>
367
- </li>
368
- <li><p> Introduced a <code>--skip-gems</code> option in the app generator to skip gems such as
369
- <code>turbolinks</code> and <code>coffee-rails</code> that does not have their own specific flags.
370
- (<a href="https://github.com/rails/rails/commit/10565895805887d4faf004a6f71219da177f78b7">Commit</a>)</p></li>
371
- <li><p> Introduced a <code>bin/setup</code> script to enable automated setup code when
372
- bootstrapping an application.
373
- (<a href="https://github.com/rails/rails/pull/15189">Pull Request</a>)</p></li>
374
- <li><p> Changed default value for <code>config.assets.digest</code> to <code>true</code> in development.
375
- (<a href="https://github.com/rails/rails/pull/15155">Pull Request</a>)</p></li>
376
- <li><p> Introduced an API to register new extensions for <code>rake notes</code>.
377
- (<a href="https://github.com/rails/rails/pull/14379">Pull Request</a>)</p></li>
378
- <li><p> Introduced <code>Rails.gem_version</code> as a convenience method to return <code>Gem::Version.new(Rails.version)</code>.
379
- (<a href="https://github.com/rails/rails/pull/14101">Pull Request</a>)</p></li>
380
- <li><p> Introduced an <code>after_bundle</code> callback in the Rails templates.
381
- (<a href="https://github.com/rails/rails/pull/16359">Pull Request</a>)</p></li>
382
- </ul>
383
- <h3 id="action-pack">4 Action Pack</h3><p>Please refer to the <a href="https://github.com/rails/rails/blob/4-2-stable/actionpack/CHANGELOG.md">Changelog</a> for detailed changes.</p><h4 id="action-pack-removals">4.1 Removals</h4>
384
- <ul>
385
- <li><p> <code>respond_with</code> and the class-level <code>respond_to</code> were removed from Rails and
386
- moved to the <code>responders</code> gem (version 2.0). Add <code>gem 'responders', '~&gt; 2.0'</code>
387
- to your <code>Gemfile</code> to continue using these features.
388
- (<a href="https://github.com/rails/rails/pull/16526">Pull Request</a>)</p></li>
389
- <li><p> Removed deprecated <code>AbstractController::Helpers::ClassMethods::MissingHelperError</code>
390
- in favor of <code>AbstractController::Helpers::MissingHelperError</code>.
391
- (<a href="https://github.com/rails/rails/commit/a1ddde15ae0d612ff2973de9cf768ed701b594e8">Commit</a>)</p></li>
392
- </ul>
393
- <h4 id="action-pack-deprecations">4.2 Deprecations</h4>
394
- <ul>
395
- <li><p> Deprecated <code>assert_tag</code>, <code>assert_no_tag</code>, <code>find_tag</code> and <code>find_all_tag</code> in
396
- favor of <code>assert_select</code>.
397
- (<a href="https://github.com/rails/rails-dom-testing/commit/b12850bc5ff23ba4b599bf2770874dd4f11bf750">Commit</a>)</p></li>
398
- <li>
399
- <p> Deprecated support for setting the <code>:to</code> option of a router to a symbol or a
400
- string that does not contain a <code>#</code> character:</p>
401
- <div class="code_container">
402
- <pre class="brush: ruby; gutter: false; toolbar: false">
403
- get '/posts', to: MyRackApp =&gt; (No change necessary)
404
- get '/posts', to: 'post#index' =&gt; (No change necessary)
405
- get '/posts', to: 'posts' =&gt; get '/posts', controller: :posts
406
- get '/posts', to: :index =&gt; get '/posts', action: :index
407
-
408
- </pre>
409
- </div>
410
- <p>(<a href="https://github.com/rails/rails/commit/cc26b6b7bccf0eea2e2c1a9ebdcc9d30ca7390d9">Commit</a>)</p>
411
- </li>
412
- </ul>
413
- <h4 id="action-pack-notable-changes">4.3 Notable changes</h4>
414
- <ul>
415
- <li><p> Rails will now automatically include the template's digest in ETags.
416
- (<a href="https://github.com/rails/rails/pull/16527">Pull Request</a>)</p></li>
417
- <li><p> <code>render nothing: true</code> or rendering a <code>nil</code> body no longer add a single
418
- space padding to the response body.
419
- (<a href="https://github.com/rails/rails/pull/14883">Pull Request</a>)</p></li>
420
- <li><p> Introduced the <code>always_permitted_parameters</code> option to configure which
421
- parameters are permitted globally. The default value of this configuration
422
- is <code>['controller', 'action']</code>.
423
- (<a href="https://github.com/rails/rails/pull/15933">Pull Request</a>)</p></li>
424
- <li>
425
- <p> The <code>*_filter</code> family methods have been removed from the documentation. Their
426
- usage is discouraged in favor of the <code>*_action</code> family methods:</p>
427
- <div class="code_container">
428
- <pre class="brush: plain; gutter: false; toolbar: false">
429
- after_filter =&gt; after_action
430
- append_after_filter =&gt; append_after_action
431
- append_around_filter =&gt; append_around_action
432
- append_before_filter =&gt; append_before_action
433
- around_filter =&gt; around_action
434
- before_filter =&gt; before_action
435
- prepend_after_filter =&gt; prepend_after_action
436
- prepend_around_filter =&gt; prepend_around_action
437
- prepend_before_filter =&gt; prepend_before_action
438
- skip_after_filter =&gt; skip_after_action
439
- skip_around_filter =&gt; skip_around_action
440
- skip_before_filter =&gt; skip_before_action
441
- skip_filter =&gt; skip_action_callback
442
-
443
- </pre>
444
- </div>
445
- <p>If your application is depending on these methods, you should use the
446
- replacement <code>*_action</code> methods instead. These methods will be deprecated in
447
- the future and eventually removed from Rails.</p>
448
- <p>(Commit <a href="https://github.com/rails/rails/commit/6c5f43bab8206747a8591435b2aa0ff7051ad3de">1</a>,
449
- <a href="https://github.com/rails/rails/commit/489a8f2a44dc9cea09154ee1ee2557d1f037c7d4">2</a>)</p>
450
- </li>
451
- <li><p> Added HTTP method <code>MKCALENDAR</code> from RFC-4791
452
- (<a href="https://github.com/rails/rails/pull/15121">Pull Request</a>)</p></li>
453
- <li><p> <code>*_fragment.action_controller</code> notifications now include the controller and action name
454
- in the payload.
455
- (<a href="https://github.com/rails/rails/pull/14137">Pull Request</a>)</p></li>
456
- <li><p> Segments that are passed into URL helpers are now automatically escaped.
457
- (<a href="https://github.com/rails/rails/commit/5460591f0226a9d248b7b4f89186bd5553e7768f">Commit</a>)</p></li>
458
- <li><p> Improved the Routing Error page with fuzzy matching for route search.
459
- (<a href="https://github.com/rails/rails/pull/14619">Pull Request</a>)</p></li>
460
- <li><p> Added an option to disable logging of CSRF failures.
461
- (<a href="https://github.com/rails/rails/pull/14280">Pull Request</a>)</p></li>
462
- </ul>
463
- <h3 id="action-view">5 Action View</h3><p>Please refer to the <a href="https://github.com/rails/rails/blob/4-2-stable/actionview/CHANGELOG.md">Changelog</a> for detailed changes.</p><h4 id="action-view-deprecations">5.1 Deprecations</h4>
464
- <ul>
465
- <li><p> Deprecated <code>AbstractController::Base.parent_prefixes</code>.
466
- Override <code>AbstractController::Base.local_prefixes</code> when you want to change
467
- where to find views.
468
- (<a href="https://github.com/rails/rails/pull/15026">Pull Request</a>)</p></li>
469
- <li><p> Deprecated <code>ActionView::Digestor#digest(name, format, finder, options = {})</code>.
470
- Arguments should be passed as a hash instead.
471
- (<a href="https://github.com/rails/rails/pull/14243">Pull Request</a>)</p></li>
472
- </ul>
473
- <h4 id="action-view-notable-changes">5.2 Notable changes</h4>
474
- <ul>
475
- <li><p> Introduced a <code>#{partial_name}_iteration</code> special local variable for use with
476
- partials that are rendered with a collection. It provides access to the
477
- current state of the iteration via the <code>#index</code>, <code>#size</code>, <code>#first?</code> and
478
- <code>#last?</code> methods.
479
- (<a href="https://github.com/rails/rails/pull/7698">Pull Request</a>)</p></li>
480
- <li><p> The form helpers no longer generate a <code>&lt;div&gt;</code> element with inline CSS around
481
- the hidden fields.
482
- (<a href="https://github.com/rails/rails/pull/14738">Pull Request</a>)</p></li>
483
- </ul>
484
- <h3 id="action-mailer">6 Action Mailer</h3><p>Please refer to the <a href="https://github.com/rails/rails/blob/4-2-stable/actionmailer/CHANGELOG.md">Changelog</a> for detailed changes.</p><h4 id="action-mailer-deprecations">6.1 Deprecations</h4>
485
- <ul>
486
- <li> Deprecated <code>*_path</code> helpers in mailers. Always use <code>*_url</code> helpers instead.
487
- (<a href="https://github.com/rails/rails/pull/15840">Pull Request</a>)</li>
488
- </ul>
489
- <h4 id="action-mailer-notable-changes">6.2 Notable changes</h4>
490
- <ul>
491
- <li><p> Introduced <code>deliver_later</code> which enqueues a job on the application's queue
492
- to deliver the mailer asynchronously.
493
- (<a href="https://github.com/rails/rails/pull/16485">Pull Request</a>)</p></li>
494
- <li><p> Added the <code>show_previews</code> configuration option for enabling mailer previews
495
- outside of the development environment.
496
- (<a href="https://github.com/rails/rails/pull/15970">Pull Request</a>)</p></li>
497
- </ul>
498
- <h3 id="active-record">7 Active Record</h3><p>Please refer to the
499
- <a href="https://github.com/rails/rails/blob/4-2-stable/activerecord/CHANGELOG.md">Changelog</a>
500
- for detailed changes.</p><h4 id="active-record-removals">7.1 Removals</h4>
501
- <ul>
502
- <li><p> Removed <code>cache_attributes</code> and friends. All attributes are cached.
503
- (<a href="https://github.com/rails/rails/pull/15429">Pull Request</a>)</p></li>
504
- <li><p> Removed deprecated method <code>ActiveRecord::Base.quoted_locking_column</code>.
505
- (<a href="https://github.com/rails/rails/pull/15612">Pull Request</a>)</p></li>
506
- <li><p> Removed deprecated <code>ActiveRecord::Migrator.proper_table_name</code>. Use the
507
- <code>proper_table_name</code> instance method on <code>ActiveRecord::Migration</code> instead.
508
- (<a href="https://github.com/rails/rails/pull/15512">Pull Request</a>)</p></li>
509
- <li><p> Removed unused <code>:timestamp</code> type. Transparently alias it to <code>:datetime</code>
510
- in all cases. Fixes inconsistencies when column types are sent outside of
511
- <code>ActiveRecord</code>, such as for XML Serialization.
512
- (<a href="https://github.com/rails/rails/pull/15184">Pull Request</a>)</p></li>
513
- </ul>
514
- <h4 id="active-record-deprecations">7.2 Deprecations</h4>
515
- <ul>
516
- <li><p> Deprecated swallowing of errors inside <code>after_commit</code> and <code>after_rollback</code>.
517
- (<a href="https://github.com/rails/rails/pull/16537">Pull Request</a>)</p></li>
518
- <li><p> Deprecated calling <code>DatabaseTasks.load_schema</code> without a connection. Use
519
- <code>DatabaseTasks.load_schema_current</code> instead.
520
- (<a href="https://github.com/rails/rails/commit/f15cef67f75e4b52fd45655d7c6ab6b35623c608">Commit</a>)</p></li>
521
- <li><p> Deprecated <code>Reflection#source_macro</code> without replacement as it is no longer
522
- needed in Active Record.
523
- (<a href="https://github.com/rails/rails/pull/16373">Pull Request</a>)</p></li>
524
- <li><p> Deprecated broken support for automatic detection of counter caches on
525
- <code>has_many :through</code> associations. You should instead manually specify the
526
- counter cache on the <code>has_many</code> and <code>belongs_to</code> associations for the
527
- through records.
528
- (<a href="https://github.com/rails/rails/pull/15754">Pull Request</a>)</p></li>
529
- <li><p> Deprecated <code>serialized_attributes</code> without replacement.
530
- (<a href="https://github.com/rails/rails/pull/15704">Pull Request</a>)</p></li>
531
- <li><p> Deprecated returning <code>nil</code> from <code>column_for_attribute</code> when no column
532
- exists. It will return a null object in Rails 5.0
533
- (<a href="https://github.com/rails/rails/pull/15878">Pull Request</a>)</p></li>
534
- <li><p> Deprecated using <code>.joins</code>, <code>.preload</code> and <code>.eager_load</code> with associations
535
- that depends on the instance state (i.e. those defined with a scope that
536
- takes an argument) without replacement.
537
- (<a href="https://github.com/rails/rails/commit/ed56e596a0467390011bc9d56d462539776adac1">Commit</a>)</p></li>
538
- <li><p> Deprecated passing Active Record objects to <code>.find</code> or <code>.exists?</code>. Call
539
- <code>#id</code> on the objects first.
540
- (Commit <a href="https://github.com/rails/rails/commit/d92ae6ccca3bcfd73546d612efaea011270bd270">1</a>,
541
- <a href="https://github.com/rails/rails/commit/d35f0033c7dec2b8d8b52058fb8db495d49596f7">2</a>)</p></li>
542
- <li>
543
- <p> Deprecated half-baked support for PostgreSQL range values with excluding
544
- beginnings. We currently map PostgreSQL ranges to Ruby ranges. This conversion
545
- is not fully possible because the Ruby range does not support excluded
546
- beginnings.</p>
547
- <p>The current solution of incrementing the beginning is not correct
548
- and is now deprecated. For subtypes where we don't know how to increment
549
- (e.g. <code>#succ</code> is not defined) it will raise an <code>ArgumentError</code> for ranges
550
- with excluding beginnings.</p>
551
- <p>(<a href="https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3">Commit</a>)</p>
552
- </li>
553
- </ul>
554
- <h4 id="active-record-notable-changes">7.3 Notable changes</h4>
555
- <ul>
556
- <li><p> The PostgreSQL adapter now supports the <code>JSONB</code> datatype in PostgreSQL 9.4+.
557
- (<a href="https://github.com/rails/rails/pull/16220">Pull Request</a>)</p></li>
558
- <li><p> The <code>#references</code> method in migrations now supports a <code>type</code> option for
559
- specifying the type of the foreign key (e.g. <code>:uuid</code>).
560
- (<a href="https://github.com/rails/rails/pull/16231">Pull Request</a>)</p></li>
561
- <li><p> Added a <code>:required</code> option to singular associations, which defines a
562
- presence validation on the association.
563
- (<a href="https://github.com/rails/rails/pull/16056">Pull Request</a>)</p></li>
564
- <li><p> Introduced <code>ActiveRecord::Base#validate!</code> that raises <code>RecordInvalid</code> if the
565
- record is invalid.
566
- (<a href="https://github.com/rails/rails/pull/8639">Pull Request</a>)</p></li>
567
- <li><p> <code>ActiveRecord::Base#reload</code> now behaves the same as <code>m = Model.find(m.id)</code>,
568
- meaning that it no longer retains the extra attributes from custom
569
- <code>select</code>s.
570
- (<a href="https://github.com/rails/rails/pull/15866">Pull Request</a>)</p></li>
571
- <li><p> Introduced the <code>bin/rake db:purge</code> task to empty the database for the
572
- current environment.
573
- (<a href="https://github.com/rails/rails/commit/e2f232aba15937a4b9d14bd91e0392c6d55be58d">Commit</a>)</p></li>
574
- <li><p> <code>ActiveRecord::Dirty</code> now detects in-place changes to mutable values.
575
- Serialized attributes on ActiveRecord models will no longer save when
576
- unchanged. This also works with other types such as string columns and json
577
- columns on PostgreSQL.
578
- (Pull Requests <a href="https://github.com/rails/rails/pull/15674">1</a>,
579
- <a href="https://github.com/rails/rails/pull/15786">2</a>,
580
- <a href="https://github.com/rails/rails/pull/15788">3</a>)</p></li>
581
- <li><p> Added support for <code>#pretty_print</code> in <code>ActiveRecord::Base</code> objects.
582
- (<a href="https://github.com/rails/rails/pull/15172">Pull Request</a>)</p></li>
583
- <li><p> PostgreSQL and SQLite adapters no longer add a default limit of 255
584
- characters on string columns.
585
- (<a href="https://github.com/rails/rails/pull/14579">Pull Request</a>)</p></li>
586
- <li><p> <code>sqlite3:///some/path</code> now resolves to the absolute system path
587
- <code>/some/path</code>. For relative paths, use <code>sqlite3:some/path</code> instead.
588
- (Previously, <code>sqlite3:///some/path</code> resolved to the relative path
589
- <code>some/path</code>. This behaviour was deprecated on Rails 4.1.)
590
- (<a href="https://github.com/rails/rails/pull/14569">Pull Request</a>)</p></li>
591
- <li><p> Introduced <code>#validate</code> as an alias for <code>#valid?</code>.
592
- (<a href="https://github.com/rails/rails/pull/14456">Pull Request</a>)</p></li>
593
- <li><p> <code>#touch</code> now accepts multiple attributes to be touched at once.
594
- (<a href="https://github.com/rails/rails/pull/14423">Pull Request</a>)</p></li>
595
- <li><p> Added support for fractional seconds for MySQL 5.6 and above.
596
- (Pull Request <a href="https://github.com/rails/rails/pull/8240">1</a>,
597
- <a href="https://github.com/rails/rails/pull/14359">2</a>)</p></li>
598
- <li><p> Added support for the <code>citext</code> column type in PostgreSQL adapter.
599
- (<a href="https://github.com/rails/rails/pull/12523">Pull Request</a>)</p></li>
600
- <li><p> Added support for user-created range types in PostgreSQL adapter.
601
- (<a href="https://github.com/rails/rails/commit/4cb47167e747e8f9dc12b0ddaf82bdb68c03e032">Commit</a>)</p></li>
602
- </ul>
603
- <h3 id="active-model">8 Active Model</h3><p>Please refer to the <a href="https://github.com/rails/rails/blob/4-2-stable/activemodel/CHANGELOG.md">Changelog</a> for detailed changes.</p><h4 id="active-model-removals">8.1 Removals</h4>
604
- <ul>
605
- <li> Removed deprecated <code>Validator#setup</code> without replacement.
606
- (<a href="https://github.com/rails/rails/pull/10716">Pull Request</a>)</li>
607
- </ul>
608
- <h4 id="active-model-deprecations">8.2 Deprecations</h4>
609
- <ul>
610
- <li><p> Deprecated reset_#{attribute} in favor of restore_#{attribute}.
611
- (<a href="https://github.com/rails/rails/pull/16180">Pull Request</a>)</p></li>
612
- <li><p> Deprecated ActiveModel::Dirty#reset_changes in favor of #clear_changes_information.
613
- (<a href="https://github.com/rails/rails/pull/16180">Pull Request</a>)</p></li>
614
- </ul>
615
- <h4 id="active-model-notable-changes">8.3 Notable changes</h4>
616
- <ul>
617
- <li><p> Introduced the <code>restore_attributes</code> method in <code>ActiveModel::Dirty</code> to restore
618
- the changed (dirty) attributes to their previous values.
619
- (Pull Request <a href="https://github.com/rails/rails/pull/14861">1</a>, <a href="https://github.com/rails/rails/pull/16180">2</a>)</p></li>
620
- <li><p> <code>has_secure_password</code> no longer disallow blank passwords (i.e. passwords
621
- that contains only spaces) by default.
622
- (<a href="https://github.com/rails/rails/pull/16412">Pull Request</a>)</p></li>
623
- <li><p> <code>has_secure_password</code> now verifies that the given password is less than 72
624
- characters if validations are enabled.
625
- (<a href="https://github.com/rails/rails/pull/15708">Pull Request</a>)</p></li>
626
- <li><p> Introduced <code>#validate</code> as an alias for <code>#valid?</code>.
627
- (<a href="https://github.com/rails/rails/pull/14456">Pull Request</a>)</p></li>
628
- </ul>
629
- <h3 id="active-support">9 Active Support</h3><p>Please refer to the <a href="https://github.com/rails/rails/blob/4-2-stable/activesupport/CHANGELOG.md">Changelog</a> for detailed changes.</p><h4 id="removals">9.1 Removals</h4>
630
- <ul>
631
- <li><p> Removed deprecated <code>Numeric#ago</code>, <code>Numeric#until</code>, <code>Numeric#since</code>,
632
- <code>Numeric#from_now</code>.
633
- (<a href="https://github.com/rails/rails/commit/f1eddea1e3f6faf93581c43651348f48b2b7d8bb">Commit</a>)</p></li>
634
- <li><p> Removed deprecated string based terminators for <code>ActiveSupport::Callbacks</code>.
635
- (<a href="https://github.com/rails/rails/pull/15100">Pull Request</a>)</p></li>
636
- </ul>
637
- <h4 id="deprecations">9.2 Deprecations</h4>
638
- <ul>
639
- <li><p> Deprecated <code>Kernel#silence_stderr</code>, <code>Kernel#capture</code> and <code>Kernel#quietly</code>
640
- without replacement.
641
- (<a href="https://github.com/rails/rails/pull/13392">Pull Request</a>)</p></li>
642
- <li><p> Deprecated <code>Class#superclass_delegating_accessor</code>, use
643
- <code>Class#class_attribute</code> instead.
644
- (<a href="https://github.com/rails/rails/pull/14271">Pull Request</a>)</p></li>
645
- <li><p> Deprecated <code>ActiveSupport::SafeBuffer#prepend!</code> as
646
- <code>ActiveSupport::SafeBuffer#prepend</code> now performs the same function.
647
- (<a href="https://github.com/rails/rails/pull/14529">Pull Request</a>)</p></li>
648
- </ul>
649
- <h4 id="notable-changes">9.3 Notable changes</h4>
650
- <ul>
651
- <li><p> The <code>travel_to</code> test helper now truncates the <code>usec</code> component to 0.
652
- (<a href="https://github.com/rails/rails/commit/9f6e82ee4783e491c20f5244a613fdeb4024beb5">Commit</a>)</p></li>
653
- <li><p> <code>ActiveSupport::TestCase</code> now randomizes the order that test cases are ran
654
- by default.
655
- (<a href="https://github.com/rails/rails/commit/6ffb29d24e05abbd9ffe3ea974140d6c70221807">Commit</a>)</p></li>
656
- <li><p> Introduced <code>Object#itself</code> as an identity function.
657
- (Commit <a href="https://github.com/rails/rails/commit/702ad710b57bef45b081ebf42e6fa70820fdd810">1</a>,
658
- <a href="https://github.com/rails/rails/commit/64d91122222c11ad3918cc8e2e3ebc4b0a03448a">2</a>)</p></li>
659
- <li><p> <code>Object#with_options</code> can now be used without an explicit receiver.
660
- (<a href="https://github.com/rails/rails/pull/16339">Pull Request</a>)</p></li>
661
- <li><p> Introduced <code>String#truncate_words</code> to truncate a string by a number of words.
662
- (<a href="https://github.com/rails/rails/pull/16190">Pull Request</a>)</p></li>
663
- <li><p> Added <code>Hash#transform_values</code> and <code>Hash#transform_values!</code> to simplify a
664
- common pattern where the values of a hash must change, but the keys are left
665
- the same.
666
- (<a href="https://github.com/rails/rails/pull/15819">Pull Request</a>)</p></li>
667
- <li><p> The <code>humanize</code> inflector helper now strips any leading underscores.
668
- (<a href="https://github.com/rails/rails/commit/daaa21bc7d20f2e4ff451637423a25ff2d5e75c7">Commit</a>)</p></li>
669
- <li><p> Introduced <code>Concern#class_methods</code> as an alternative to
670
- <code>module ClassMethods</code>, as well as <code>Kernel#concern</code> to avoid the
671
- <code>module Foo; extend ActiveSupport::Concern; end</code> boilerplate.
672
- (<a href="https://github.com/rails/rails/commit/b16c36e688970df2f96f793a759365b248b582ad">Commit</a>)</p></li>
673
- </ul>
674
- <h3 id="credits">10 Credits</h3><p>See the
675
- <a href="http://contributors.rubyonrails.org/">full list of contributors to Rails</a> for
676
- the many people who spent many hours making Rails the stable and robust
677
- framework it is today. Kudos to all of them.</p>
678
-
679
- <h3>Feedback</h3>
680
- <p>
681
- You're encouraged to help improve the quality of this guide.
682
- </p>
683
- <p>
684
- Please contribute if you see any typos or factual errors.
685
- 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.
686
- </p>
687
- <p>
688
- You may also find incomplete content, or stuff that is not up to date.
689
- Please do add any missing documentation for master. Make sure to check
690
- <a href="http://edgeguides.rubyonrails.org">Edge Guides</a> first to verify
691
- if the issues are already fixed or not on the master branch.
692
- Check the <a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</a>
693
- for style and conventions.
694
- </p>
695
- <p>
696
- If for whatever reason you spot something to fix but cannot patch it yourself, please
697
- <a href="https://github.com/rails/rails/issues">open an issue</a>.
698
- </p>
699
- <p>And last but not least, any kind of discussion regarding Ruby on Rails
700
- documentation is very welcome in the <a href="http://groups.google.com/group/rubyonrails-docs">rubyonrails-docs mailing list</a>.
701
- </p>
702
- </div>
703
- </div>
704
- </div>
705
-
706
- <hr class="hide" />
707
- <div id="footer">
708
- <div class="wrapper">
709
- <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>
710
- <p>"Rails", "Ruby on Rails", and the Rails logo are trademarks of David Heinemeier Hansson. All rights reserved.</p>
711
-
712
- </div>
713
- </div>
714
-
715
- <script type="text/javascript" src="javascripts/jquery.min.js"></script>
716
- <script type="text/javascript" src="javascripts/responsive-tables.js"></script>
717
- <script type="text/javascript" src="javascripts/guides.js"></script>
718
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shCore.js"></script>
719
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushRuby.js"></script>
720
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushXml.js"></script>
721
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushSql.js"></script>
722
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushPlain.js"></script>
723
- <script type="text/javascript">
724
- SyntaxHighlighter.all();
725
- $(guidesIndex.bind);
726
- </script>
727
- </body>
728
- </html>