From ff7a0efced5f267752a7dfd9f3e63322391fc5b7 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Tue, 21 Feb 2017 22:23:37 +0530 Subject: Add first draft of release notes for Rails 5.1 :tada: [ci skip] --- guides/source/5_1_release_notes.md | 98 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 guides/source/5_1_release_notes.md (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md new file mode 100644 index 0000000000..6733426aaa --- /dev/null +++ b/guides/source/5_1_release_notes.md @@ -0,0 +1,98 @@ +**DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON http://guides.rubyonrails.org.** + +Ruby on Rails 5.1 Release Notes +=============================== + +Highlights in Rails 5.1: + +* Yarn Support +* Optional Webpack support +* jQuery no longer a default dependency +* System tests +* Encrypted secrets +* Parameterized mailers +* Direct & resolved routes +* Unification of form_for and form_tag into form_with + +These release notes cover only the major changes. To learn about various bug +fixes and changes, please refer to the change logs or check out the [list of +commits](https://github.com/rails/rails/commits/5-1-stable) in the main Rails +repository on GitHub. + +-------------------------------------------------------------------------------- + +Upgrading to Rails 5.1 +---------------------- + +ToDo + +Major Features +-------------- + +### Yarn Support + +### System tests + +### Encrypted secrets + +### Parameterized mailers + +### Direct & resolved routes + +Railties +-------- + +Please refer to the [Changelog][railties] for detailed changes. + +Action Pack +----------- + +Please refer to the [Changelog][action-pack] for detailed changes. + +Action View +------------- + +Please refer to the [Changelog][action-view] for detailed changes. + +Action Mailer +------------- + +Please refer to the [Changelog][action-mailer] for detailed changes. + +Active Record +------------- + +Please refer to the [Changelog][active-record] for detailed changes. + +Active Model +------------ + +Please refer to the [Changelog][active-model] for detailed changes. + +Active Job +----------- + +Please refer to the [Changelog][active-job] for detailed changes. + +Active Support +-------------- + +Please refer to the [Changelog][active-support] for detailed changes. + +Credits +------- + +See the +[full list of contributors to Rails](http://contributors.rubyonrails.org/) for +the many people who spent many hours making Rails, the stable and robust +framework it is. Kudos to all of them. + +[railties]: https://github.com/rails/rails/blob/5-1-stable/railties/CHANGELOG.md +[action-pack]: https://github.com/rails/rails/blob/5-1-stable/actionpack/CHANGELOG.md +[action-view]: https://github.com/rails/rails/blob/5-1-stable/actionview/CHANGELOG.md +[action-mailer]: https://github.com/rails/rails/blob/5-1-stable/actionmailer/CHANGELOG.md +[action-cable]: https://github.com/rails/rails/blob/5-1-stable/actioncable/CHANGELOG.md +[active-record]: https://github.com/rails/rails/blob/5-1-stable/activerecord/CHANGELOG.md +[active-model]: https://github.com/rails/rails/blob/5-1-stable/activemodel/CHANGELOG.md +[active-support]: https://github.com/rails/rails/blob/5-1-stable/activesupport/CHANGELOG.md +[active-job]: https://github.com/rails/rails/blob/5-1-stable/activejob/CHANGELOG.md -- cgit v1.2.3 From d8fd067969c4be4d8c38624a7cb79f770e087760 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Tue, 21 Feb 2017 22:38:30 +0530 Subject: Add PR links for major features [ci skip] --- guides/source/5_1_release_notes.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 6733426aaa..f195922dca 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -31,14 +31,25 @@ Major Features ### Yarn Support +[Pull Request](https://github.com/rails/rails/pull/26836) + ### System tests +[Pull Request](https://github.com/rails/rails/pull/26703) + ### Encrypted secrets +[Pull Request](https://github.com/rails/rails/pull/28038) + ### Parameterized mailers +[Pull Request](https://github.com/rails/rails/pull/27825) + ### Direct & resolved routes +[Pull Request](https://github.com/rails/rails/pull/23138) + + Railties -------- -- cgit v1.2.3 From b4dbe8c7338f0b531d60dbae12031a51ab7a7dcc Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Fri, 3 Mar 2017 12:31:31 +0530 Subject: Add blurbs about each new feature [ci skip] --- guides/source/5_1_release_notes.md | 158 +++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index f195922dca..f3c8f1f155 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -33,22 +33,180 @@ Major Features [Pull Request](https://github.com/rails/rails/pull/26836) +Rails 5.1 will allow managing JavaScript dependencies +from NPM via Yarn.This will make it easy to use libraries like React, VueJS +or any other library from NPM world. The Yarn support is integrated with +the asset pipeline so that all dependencies will work seamlessly with the +Rails 5.1 app. + +### Optional Webpack support + +Rails apps can use Webpack easily now using the [Webpacker](https://github.com/rails/webpacker) +gem. New Rails 5.1 app can be generated using `--webpack` switch to enable Webpack integration. + +This is fully compatible with the asset pipeline, which you can continue to use for +images, fonts, sounds, whatever. You can even have some JavaScript on the asset pipeline +and some done via Webpack. It’s all managed via Yarn that’s on by default. + +### jQuery no longer a default dependency + +jQuery was required by default in earlier versions of Rails to provide features like +`data-remote`, `data-confirm` and other parts of Rails UJS. It is no longer required, +as the `rails-ujs` is now written using plain vanilla JavaScript. + +You can still use jQuery if needed, but it is no longer required by default. + ### System tests [Pull Request](https://github.com/rails/rails/pull/26703) +Rails 5.1 has support for writing Capybara tests baked in in the form of +System tests. Now you don't have to worry about configuring Capybara and +database cleaning strategies for such tests. Rails 5.1 provides a wrapper +for running such tests in chrome with additional features such as failure +screenshots. + ### Encrypted secrets [Pull Request](https://github.com/rails/rails/pull/28038) +Rails will now allow management of application secrets in a secure way +built on top of [sekrets](https://github.com/ahoward/sekrets) gem. + +Run `bin/rails secrets:setup` to setup a new encrypted secrets file. It will +generate a master key which needs to be stored outside of the repository and it will +allow checking in the actual secrets in the revision control. + +The secrets will be decrypted in production either using `RAILS_MASTER_KEY` from +the ENV or injected key file. + ### Parameterized mailers [Pull Request](https://github.com/rails/rails/pull/27825) +Allows specifying common params used for all methods in a mailer class +to share instance variables, headers and other common setup. + +``` ruby +class InvitationsMailer < ApplicationMailer + + before_action { @inviter, @invitee = params[:inviter], params[:invitee] } + before_action { @account = params[:inviter].account } + + def account_invitation + mail subject: "#{@inviter.name} invited you to their Basecamp (#{@account.name})" + end + + def project_invitation + @project = params[:project] + @summarizer = ProjectInvitationSummarizer.new(@project.bucket) + + mail subject: "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})" + end +end + +InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later +``` + ### Direct & resolved routes [Pull Request](https://github.com/rails/rails/pull/23138) +Rails 5.1 has added two new methods - `resolve` and `direct` to the routing +DSL. + +The `resolve` method allows customizing polymorphic mapping of models. + +``` ruby +resource :basket + +resolve(class: "Basket") { [:basket] } +``` + +``` erb +<%= form_for @basket do |form| %> + +<% end %> +``` + +This will generate the singular URL `/basket` instead of usual `/baskets/:id`. + +The `direct` method allows creation of custom URL helpers. + +``` ruby +direct(:homepage) { "http://www.rubyonrails.org" } + +>> homepage_url +=> "http://www.rubyonrails.org" +``` + +The return value of the block must be a valid argument for the `url_for` +method. So you can pass a valid string URL, or a hash, or an array, or an +Active Model instance or an Active Model class. + +``` ruby +direct :commentable do |model| + [ model, anchor: model.dom_id ] +end + +direct :main do + { controller: 'pages', action: 'index', subdomain: 'www' } +end +``` + +### Unification of form_for and form_tag into form_with + +[Pull Request](https://github.com/rails/rails/pull/26976) + +Before Rails 5.1, there were two interfaces for handling HTML forms, +`form_for` for model instances and `form_tag` for custom URLs. + +Rails 5.1 combines both of these interfaces with `form_with` and +can generate form tags based on URLs, scopes or models. + +``` erb +# Using just a URL: + +<%= form_with url: posts_path do |form| %> + <%= form.text_field :title %> +<% end %> + +# => +
+ +
+ +# Adding a scope prefixes the input field names: + +<%= form_with scope: :post, url: posts_path do |form| %> + <%= form.text_field :title %> +<% end %> +# => +
+ +
+ +# Using a model infers both the URL and scope: + +<%= form_with model: Post.new do |form| %> + <%= form.text_field :title %> +<% end %> +# => +
+ +
+ +# An existing model makes an update form and fills out field values: + +<%= form_with model: Post.first do |form| %> + <%= form.text_field :title %> +<% end %> +# => +
+ + +
+``` Railties -------- -- cgit v1.2.3 From 7b02f86680b2d712ea5b0ca541dc620f0a524b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 17 Mar 2017 13:14:51 -0400 Subject: Fix resolve usage in the release notes [ci skip] --- guides/source/5_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index f3c8f1f155..6bd5321b92 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -120,7 +120,7 @@ The `resolve` method allows customizing polymorphic mapping of models. ``` ruby resource :basket -resolve(class: "Basket") { [:basket] } +resolve("Basket") { [:basket] } ``` ``` erb -- cgit v1.2.3 From 33786f62f9a1f9bd855bc51da501fb6a0fd6d0bf Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 18 Mar 2017 22:07:20 -0400 Subject: First pass on 5.1 release notes Fixing tons of grammar, etc. [ci skip] --- guides/source/5_1_release_notes.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 6bd5321b92..5b46cc57b2 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -41,20 +41,24 @@ Rails 5.1 app. ### Optional Webpack support -Rails apps can use Webpack easily now using the [Webpacker](https://github.com/rails/webpacker) -gem. New Rails 5.1 app can be generated using `--webpack` switch to enable Webpack integration. +Rails apps can integrate with [Webpack](https://webpack.js.org/), a JavaScript +asset bundler, more easily using the new [Webpacker](https://github.com/rails/webpacker) +gem. Use the `--webpack` flag when generating new applications to enable Webpack +integration. This is fully compatible with the asset pipeline, which you can continue to use for -images, fonts, sounds, whatever. You can even have some JavaScript on the asset pipeline -and some done via Webpack. It’s all managed via Yarn that’s on by default. +images, fonts, sounds, and other assets. You can even have some JavaScript code +managed by the asset pipeline, and other code processed via Webpack. It’s all managed via Yarn that’s on by default. ### jQuery no longer a default dependency -jQuery was required by default in earlier versions of Rails to provide features like -`data-remote`, `data-confirm` and other parts of Rails UJS. It is no longer required, -as the `rails-ujs` is now written using plain vanilla JavaScript. +jQuery was required by default in earlier versions of Rails to provide features +like `data-remote`, `data-confirm` and other parts of Rails' Unobtrusive JavaScript +offerings. It is no longer required, as the UJS has been rewritten to use plain, +vanilla JavaScript. This code now ships inside of Action View as +`rails-ujs`. -You can still use jQuery if needed, but it is no longer required by default. +You can still use jQuery version if needed, but it is no longer required by default. ### System tests @@ -63,7 +67,7 @@ You can still use jQuery if needed, but it is no longer required by default. Rails 5.1 has support for writing Capybara tests baked in in the form of System tests. Now you don't have to worry about configuring Capybara and database cleaning strategies for such tests. Rails 5.1 provides a wrapper -for running such tests in chrome with additional features such as failure +for running tests in Chrome with additional features such as failure screenshots. ### Encrypted secrets @@ -71,14 +75,14 @@ screenshots. [Pull Request](https://github.com/rails/rails/pull/28038) Rails will now allow management of application secrets in a secure way -built on top of [sekrets](https://github.com/ahoward/sekrets) gem. +built on top of the [sekrets](https://github.com/ahoward/sekrets) gem. Run `bin/rails secrets:setup` to setup a new encrypted secrets file. It will -generate a master key which needs to be stored outside of the repository and it will +generate a master key which needs to be stored outside of the repository, and it will allow checking in the actual secrets in the revision control. -The secrets will be decrypted in production either using `RAILS_MASTER_KEY` from -the ENV or injected key file. +The secrets will be decrypted in production using either the `RAILS_MASTER_KEY` +environment variable from a key file. ### Parameterized mailers @@ -112,7 +116,7 @@ InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation. [Pull Request](https://github.com/rails/rails/pull/23138) -Rails 5.1 has added two new methods - `resolve` and `direct` to the routing +Rails 5.1 has added two new methods, `resolve` and `direct`, to the routing DSL. The `resolve` method allows customizing polymorphic mapping of models. -- cgit v1.2.3 From cb12b2a075956cac23da86648028b45e8ee30f69 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 18 Mar 2017 22:09:53 -0400 Subject: Second pass on 5.1 release notes [ci skip] --- guides/source/5_1_release_notes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 5b46cc57b2..1b6eb76e32 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -133,7 +133,7 @@ resolve("Basket") { [:basket] } <% end %> ``` -This will generate the singular URL `/basket` instead of usual `/baskets/:id`. +This will generate the singular URL `/basket` instead of the usual `/baskets/:id`. The `direct` method allows creation of custom URL helpers. @@ -145,8 +145,8 @@ direct(:homepage) { "http://www.rubyonrails.org" } ``` The return value of the block must be a valid argument for the `url_for` -method. So you can pass a valid string URL, or a hash, or an array, or an -Active Model instance or an Active Model class. +method. So, you can pass a valid string URL, Hash, array, an +Active Model instance, or an Active Model class. ``` ruby direct :commentable do |model| @@ -162,10 +162,10 @@ end [Pull Request](https://github.com/rails/rails/pull/26976) -Before Rails 5.1, there were two interfaces for handling HTML forms, +Before Rails 5.1, there were two interfaces for handling HTML forms: `form_for` for model instances and `form_tag` for custom URLs. -Rails 5.1 combines both of these interfaces with `form_with` and +Rails 5.1 combines both of these interfaces with `form_with`, and can generate form tags based on URLs, scopes or models. ``` erb -- cgit v1.2.3 From 061927b4a84770c71f26e706e8720e56eed32b58 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 18 Mar 2017 22:15:27 -0400 Subject: Add link to Webpack/Webpacker PR [ci skip] --- guides/source/5_1_release_notes.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 1b6eb76e32..d072c67108 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -41,6 +41,8 @@ Rails 5.1 app. ### Optional Webpack support +[Pull Request](https://github.com/rails/rails/pull/27288) + Rails apps can integrate with [Webpack](https://webpack.js.org/), a JavaScript asset bundler, more easily using the new [Webpacker](https://github.com/rails/webpacker) gem. Use the `--webpack` flag when generating new applications to enable Webpack -- cgit v1.2.3 From 5e8dfcd12d1c496cf811a32f9f22de6a40d5abd3 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 18 Mar 2017 22:20:01 -0400 Subject: Add link to rails-ujs/dropping jQuery PR [ci skip] --- guides/source/5_1_release_notes.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index d072c67108..0216f04761 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -54,6 +54,8 @@ managed by the asset pipeline, and other code processed via Webpack. It’s all ### jQuery no longer a default dependency +[Pull Request](https://github.com/rails/rails/pull/27113) + jQuery was required by default in earlier versions of Rails to provide features like `data-remote`, `data-confirm` and other parts of Rails' Unobtrusive JavaScript offerings. It is no longer required, as the UJS has been rewritten to use plain, -- cgit v1.2.3 From aa56c89eb2691ffccdd60e72d5c17118edbf1b63 Mon Sep 17 00:00:00 2001 From: Simon Dawson Date: Sun, 19 Mar 2017 08:31:49 +0000 Subject: Minor grammar fixes for Rails 5.1 release notes --- guides/source/5_1_release_notes.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 0216f04761..5d4885d55c 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -34,7 +34,7 @@ Major Features [Pull Request](https://github.com/rails/rails/pull/26836) Rails 5.1 will allow managing JavaScript dependencies -from NPM via Yarn.This will make it easy to use libraries like React, VueJS +from NPM via Yarn. This will make it easy to use libraries like React, VueJS or any other library from NPM world. The Yarn support is integrated with the asset pipeline so that all dependencies will work seamlessly with the Rails 5.1 app. @@ -50,7 +50,8 @@ integration. This is fully compatible with the asset pipeline, which you can continue to use for images, fonts, sounds, and other assets. You can even have some JavaScript code -managed by the asset pipeline, and other code processed via Webpack. It’s all managed via Yarn that’s on by default. +managed by the asset pipeline, and other code processed via Webpack. All of this is managed +by Yarn, which is enabled by default. ### jQuery no longer a default dependency @@ -62,14 +63,14 @@ offerings. It is no longer required, as the UJS has been rewritten to use plain, vanilla JavaScript. This code now ships inside of Action View as `rails-ujs`. -You can still use jQuery version if needed, but it is no longer required by default. +You can still use the jQuery version if needed, but it is no longer required by default. ### System tests [Pull Request](https://github.com/rails/rails/pull/26703) -Rails 5.1 has support for writing Capybara tests baked in in the form of -System tests. Now you don't have to worry about configuring Capybara and +Rails 5.1 has baked-in support for writing Capybara tests, in the form of +System tests. You need no longer worry about configuring Capybara and database cleaning strategies for such tests. Rails 5.1 provides a wrapper for running tests in Chrome with additional features such as failure screenshots. @@ -78,15 +79,16 @@ screenshots. [Pull Request](https://github.com/rails/rails/pull/28038) -Rails will now allow management of application secrets in a secure way -built on top of the [sekrets](https://github.com/ahoward/sekrets) gem. +Rails will now allow management of application secrets in a secure way, +building on top of the [sekrets](https://github.com/ahoward/sekrets) gem. -Run `bin/rails secrets:setup` to setup a new encrypted secrets file. It will -generate a master key which needs to be stored outside of the repository, and it will -allow checking in the actual secrets in the revision control. +Run `bin/rails secrets:setup` to setup a new encrypted secrets file. This will +also generate a master key, which must be stored outside of the repository. The +secrets themselves can then be safely checked into the revision control system, +in an encrypted form. -The secrets will be decrypted in production using either the `RAILS_MASTER_KEY` -environment variable from a key file. +Secrets will be decrypted in production, using a key stored either in the +`RAILS_MASTER_KEY` environment variable, or in a key file. ### Parameterized mailers @@ -149,7 +151,7 @@ direct(:homepage) { "http://www.rubyonrails.org" } ``` The return value of the block must be a valid argument for the `url_for` -method. So, you can pass a valid string URL, Hash, array, an +method. So, you can pass a valid string URL, Hash, Array, an Active Model instance, or an Active Model class. ``` ruby -- cgit v1.2.3 From f785ad786ae49dd6f7a2f1d77c44ea17008c6656 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 8 Apr 2017 17:10:42 -0400 Subject: Add scaffolding for different sections in 5.1 release notes [ci skip] --- guides/source/5_1_release_notes.md | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 5d4885d55c..d796236807 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -223,41 +223,89 @@ Railties Please refer to the [Changelog][railties] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Action Pack ----------- Please refer to the [Changelog][action-pack] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Action View ------------- Please refer to the [Changelog][action-view] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Action Mailer ------------- Please refer to the [Changelog][action-mailer] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Active Record ------------- Please refer to the [Changelog][active-record] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Active Model ------------ Please refer to the [Changelog][active-model] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Active Job ----------- Please refer to the [Changelog][active-job] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Active Support -------------- Please refer to the [Changelog][active-support] for detailed changes. +### Removals + +### Deprecations + +### Notable changes + Credits ------- -- cgit v1.2.3 From 3b5a6dfb18f33c373a89760c60d741f34206f23b Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 8 Apr 2017 20:52:07 -0400 Subject: Add text to "Upgrading to Rails 5.1" [ci skip] --- guides/source/5_1_release_notes.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index d796236807..e995c50297 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -24,7 +24,14 @@ repository on GitHub. Upgrading to Rails 5.1 ---------------------- -ToDo +If you're upgrading an existing application, it's a great idea to have good test +coverage before going in. You should also first upgrade to Rails 5.0 in case you +haven't and make sure your application still runs as expected before attempting +an update to Rails 5.1. A list of things to watch out for when upgrading is +available in the +[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-5-0-to-rails-5-1) +guide. + Major Features -------------- -- cgit v1.2.3 From cad58fb413947142cc501d55ec6ab7099b3ff706 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Mon, 27 Mar 2017 03:55:20 +0530 Subject: Started adding release notes for Rails 5.1 [ci skip] --- guides/source/5_1_release_notes.md | 94 +++++++++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 22 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index e995c50297..cf6158b6fa 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -228,90 +228,140 @@ can generate form tags based on URLs, scopes or models. Railties -------- +### Removals + +### Deprecations + +### Notable Changes + Please refer to the [Changelog][railties] for detailed changes. +Action Cable +----------- + ### Removals ### Deprecations -### Notable changes +### Notable Changes + +* Added support for `channel_prefix` to Redis and evented Redis adapters + in `cable.yml` to avoid name collisions when using the same Redis server + with multiple applications. + ([Pull Request](https://github.com/rails/rails/pull/27425)) + +Please refer to the [Changelog][action-cable] for detailed changes. Action Pack ----------- -Please refer to the [Changelog][action-pack] for detailed changes. - ### Removals ### Deprecations -### Notable changes +### Notable Changes + +Please refer to the [Changelog][action-pack] for detailed changes. Action View ------------- -Please refer to the [Changelog][action-view] for detailed changes. - ### Removals ### Deprecations -### Notable changes +### Notable Changes + +Please refer to the [Changelog][action-view] for detailed changes. Action Mailer ------------- -Please refer to the [Changelog][action-mailer] for detailed changes. - ### Removals ### Deprecations -### Notable changes +### Notable Changes + +* Allowed setting custom content type when attachments are included + and body is set inline. + ([Pull Request](https://github.com/rails/rails/pull/27227)) + +* Allowed passing lambdas as values to the `default` method. + ([Commit](https://github.com/rails/rails/commit/1cec84ad2ddd843484ed40b1eb7492063ce71baf)) + +* Added support for parameterized invocation of mailers to share before filters and defaults + between different mailer actions. + ([Commit](https://github.com/rails/rails/commit/1cec84ad2ddd843484ed40b1eb7492063ce71baf)) + +* Passed the incoming arguments to the mailer action to `process.action_mailer` event under + an `args` key. + ([Pull Request](https://github.com/rails/rails/pull/27900)) + +Please refer to the [Changelog][action-mailer] for detailed changes. Active Record ------------- -Please refer to the [Changelog][active-record] for detailed changes. - ### Removals ### Deprecations -### Notable changes +### Notable Changes + +* Skipped comments in the output of `mysqldump` command by default. + ([Pull Request](https://github.com/rails/rails/pull/23301)) + +* Fixed `ActiveRecord::Relation#count` to use Ruby's `Enumerable#count` for counting + records when a block is passed as argument instead of silently ignoring the + passed block. + ([Pull Request](https://github.com/rails/rails/pull/24203)) + +* Pass `"-v ON_ERROR_STOP=1"` flag with `psql` command to not suppress SQL errors. + ([Pull Request](https://github.com/rails/rails/pull/24773)) + +Please refer to the [Changelog][active-record] for detailed changes. Active Model ------------ -Please refer to the [Changelog][active-model] for detailed changes. - ### Removals ### Deprecations -### Notable changes +### Notable Changes + +Please refer to the [Changelog][active-model] for detailed changes. Active Job ----------- -Please refer to the [Changelog][active-job] for detailed changes. - ### Removals ### Deprecations -### Notable changes +### Notable Changes + +Please refer to the [Changelog][active-job] for detailed changes. Active Support -------------- -Please refer to the [Changelog][active-support] for detailed changes. - ### Removals ### Deprecations -### Notable changes +### Notable Changes + +* Added `Module#delegate_missing_to` to delegate method calls not + defined for the current object to a proxy object. + ([Pull Request](https://github.com/rails/rails/pull/23930)) + +* Added `Date#all_day` which returns a range representing the whole day + of the current date & time. + ([Pull Request](https://github.com/rails/rails/pull/24930)) + +Please refer to the [Changelog][active-support] for detailed changes. Credits ------- -- cgit v1.2.3 From 066e5d62d5e83830040083b5f34c9da8bed0ba4f Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 15 Apr 2017 14:22:01 -0400 Subject: Revert parts of cad58fb Changelog links at the top of the components, and lowercased the 'c' in notable changes. Personally, the styling isn't super important to me, but it's what we always done in previous guides, so I figured it's better to keep with what we've always done. [ci skip] --- guides/source/5_1_release_notes.md | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index cf6158b6fa..43b5a0fdaf 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -228,60 +228,62 @@ can generate form tags based on URLs, scopes or models. Railties -------- +Please refer to the [Changelog][railties] for detailed changes. + ### Removals ### Deprecations -### Notable Changes - -Please refer to the [Changelog][railties] for detailed changes. +### Notable changes Action Cable ----------- +Please refer to the [Changelog][action-cable] for detailed changes. + ### Removals ### Deprecations -### Notable Changes +### Notable changes * Added support for `channel_prefix` to Redis and evented Redis adapters in `cable.yml` to avoid name collisions when using the same Redis server with multiple applications. ([Pull Request](https://github.com/rails/rails/pull/27425)) -Please refer to the [Changelog][action-cable] for detailed changes. - Action Pack ----------- +Please refer to the [Changelog][action-pack] for detailed changes. + ### Removals ### Deprecations -### Notable Changes - -Please refer to the [Changelog][action-pack] for detailed changes. +### Notable changes Action View ------------- +Please refer to the [Changelog][action-view] for detailed changes. + ### Removals ### Deprecations -### Notable Changes - -Please refer to the [Changelog][action-view] for detailed changes. +### Notable changes Action Mailer ------------- +Please refer to the [Changelog][action-mailer] for detailed changes. + ### Removals ### Deprecations -### Notable Changes +### Notable changes * Allowed setting custom content type when attachments are included and body is set inline. @@ -298,16 +300,16 @@ Action Mailer an `args` key. ([Pull Request](https://github.com/rails/rails/pull/27900)) -Please refer to the [Changelog][action-mailer] for detailed changes. - Active Record ------------- +Please refer to the [Changelog][active-record] for detailed changes. + ### Removals ### Deprecations -### Notable Changes +### Notable changes * Skipped comments in the output of `mysqldump` command by default. ([Pull Request](https://github.com/rails/rails/pull/23301)) @@ -320,38 +322,38 @@ Active Record * Pass `"-v ON_ERROR_STOP=1"` flag with `psql` command to not suppress SQL errors. ([Pull Request](https://github.com/rails/rails/pull/24773)) -Please refer to the [Changelog][active-record] for detailed changes. - Active Model ------------ +Please refer to the [Changelog][active-model] for detailed changes. + ### Removals ### Deprecations -### Notable Changes - -Please refer to the [Changelog][active-model] for detailed changes. +### Notable changes Active Job ----------- +Please refer to the [Changelog][active-job] for detailed changes. + ### Removals ### Deprecations -### Notable Changes - -Please refer to the [Changelog][active-job] for detailed changes. +### Notable changes Active Support -------------- +Please refer to the [Changelog][active-support] for detailed changes. + ### Removals ### Deprecations -### Notable Changes +### Notable changes * Added `Module#delegate_missing_to` to delegate method calls not defined for the current object to a proxy object. @@ -361,8 +363,6 @@ Active Support of the current date & time. ([Pull Request](https://github.com/rails/rails/pull/24930)) -Please refer to the [Changelog][active-support] for detailed changes. - Credits ------- -- cgit v1.2.3 From 31f27aa25806670545a7d17f5c6a04d0acd27beb Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 10:35:36 -0400 Subject: Add Active Job info to 5.1 release notes [ci skip] --- guides/source/5_1_release_notes.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 43b5a0fdaf..f9062920f0 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -340,10 +340,21 @@ Please refer to the [Changelog][active-job] for detailed changes. ### Removals -### Deprecations +* Removed deprecated support to passing the adapter class to `.queue_adapter`. + ([commit](https://github.com/rails/rails/commit/d1fc0a5eb286600abf8505516897b96c2f1ef3f6)) + +* Removed deprecated `#original_exception` in `ActiveJob::DeserializationError`. + ([commit](https://github.com/rails/rails/commit/d861a1fcf8401a173876489d8cee1ede1cecde3b)) ### Notable changes +* Added declarative exception handling via `ActiveJob::Base.retry_on` and `ActiveJob::Base.discard_on`. + ([Pull Request](https://github.com/rails/rails/pull/25991)) + +* Yield the job instance so you have access to things like `job.arguments` on + the custom logic after retries fail. + ([commit](https://github.com/rails/rails/commit/a1e4c197cb12fef66530a2edfaeda75566088d1f)) + Active Support -------------- -- cgit v1.2.3 From 3ec76256e88d36e251c388921d0fd172e86fa297 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 10:39:30 -0400 Subject: Finish Action Mailer section in release notes [ci skip] --- guides/source/5_1_release_notes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index f9062920f0..6c9b519605 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -279,12 +279,12 @@ Action Mailer Please refer to the [Changelog][action-mailer] for detailed changes. -### Removals - -### Deprecations - ### Notable changes +* Exception handling: use `rescue_from` to handle exceptions raised by + mailer actions, by message delivery, and by deferred delivery jobs. + ([commit](https://github.com/rails/rails/commit/e35b98e6f5c54330245645f2ed40d56c74538902)) + * Allowed setting custom content type when attachments are included and body is set inline. ([Pull Request](https://github.com/rails/rails/pull/27227)) -- cgit v1.2.3 From 334d4cd3c75966a44239c7f31507fc1b4ecd1c85 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 10:48:41 -0400 Subject: Finish Action Cable section in release notes [ci skip] --- guides/source/5_1_release_notes.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 6c9b519605..27a7a748bd 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -252,6 +252,12 @@ Please refer to the [Changelog][action-cable] for detailed changes. with multiple applications. ([Pull Request](https://github.com/rails/rails/pull/27425)) +* Permit same-origin connections by default. + ([commit](https://github.com/rails/rails/commit/dae404473409fcab0e07976aec626df670e52282)) + +* Add `ActiveSupport::Notifications` hook for broadcasing data. + ([Pull Request](https://github.com/rails/rails/pull/24988)) + Action Pack ----------- -- cgit v1.2.3 From 13eb67309ef31f2b61b74639ae8234adee3b9eac Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 10:49:19 -0400 Subject: Remove unused headings [ci skip] --- guides/source/5_1_release_notes.md | 4 ---- 1 file changed, 4 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 27a7a748bd..371ef73c4b 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -241,10 +241,6 @@ Action Cable Please refer to the [Changelog][action-cable] for detailed changes. -### Removals - -### Deprecations - ### Notable changes * Added support for `channel_prefix` to Redis and evented Redis adapters -- cgit v1.2.3 From 87367703b35bddf9b63cc96ced90a75e214e5a77 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 10:57:51 -0400 Subject: Add Active Model info to 5.1 release notes [ci skip] --- guides/source/5_1_release_notes.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 371ef73c4b..1bfb6491f3 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -331,10 +331,21 @@ Please refer to the [Changelog][active-model] for detailed changes. ### Removals -### Deprecations +* Removed deprecated methods in `ActiveModel::Errors`. + ([commit](https://github.com/rails/rails/commit/9de6457ab0767ebab7f2c8bc583420fda072e2bd)) + +* Removed deprecated `:tokenizer` option in the length validator. + ([commit](https://github.com/rails/rails/commit/6a78e0ecd6122a6b1be9a95e6c4e21e10e429513)) + +* Remove deprecated behavior that halts callbacks when the return value is false. + ([commit](https://github.com/rails/rails/commit/3a25cdca3e0d29ee2040931d0cb6c275d612dffe)) ### Notable changes +* The original string assigned to a model attribute is no longer incorrectly + frozen. + ([Pull Request](https://github.com/rails/rails/pull/28729)) + Active Job ----------- -- cgit v1.2.3 From ee9f97de94fef19550da3006f36e5090d138cdbc Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 11:10:24 -0400 Subject: Add Railties info to 5.1 release notes [ci skip] --- guides/source/5_1_release_notes.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 1bfb6491f3..be978295e2 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -232,10 +232,46 @@ Please refer to the [Changelog][railties] for detailed changes. ### Removals +* Remove deprecated `config.static_cache_control`. + ([commit](https://github.com/rails/rails/commit/c861decd44198f8d7d774ee6a74194d1ac1a5a13) + +* Remove deprecated `config.serve_static_files`. + ([commit](https://github.com/rails/rails/commit/0129ca2eeb6d5b2ea8c6e6be38eeb770fe45f1fa)) + +* Remove deprecated file `rails/rack/debugger`. + ([commit](https://github.com/rails/rails/commit/7563bf7b46e6f04e160d664e284a33052f9804b8)) + +* Remove deprecated tasks: `rails:update`, `rails:template`, `rails:template:copy`, + `rails:update:configs` and `rails:update:bin`. + ([commit](https://github.com/rails/rails/commit/f7782812f7e727178e4a743aa2874c078b722eef)) + +* Remove deprecated `CONTROLLER` environment variable for `routes` task. + ([commit](https://github.com/rails/rails/commit/f9ed83321ac1d1902578a0aacdfe55d3db754219)) + +* Remove -j (--javascript) option from `rails new` command. + ([Pull Request](https://github.com/rails/rails/pull/28546)) + ### Deprecations ### Notable changes +* The config file `secrets.yml` is now loaded in with all keys as symbols. + ([Pull Request](https://github.com/rails/rails/pull/26929)) + +* Removed jquery-rails from default stack. rails-ujs, which is shipped + with Action View, is included as default UJS adapter. + ([Pull Request](https://github.com/rails/rails/pull/27113)) + +* Add Yarn support in new apps with a yarn binstub and package.json. + ([Pull Request](https://github.com/rails/rails/pull/26836)) + +* Add Webpack support in new apps via the --webpack option, which will delegate + to the rails/webpacker gem. + ([Pull Request](https://github.com/rails/rails/pull/27288)) + +* Add encrypted secrets in `config/secrets.yml.enc`. + ([Pull Request](https://github.com/rails/rails/pull/28038)) + Action Cable ----------- -- cgit v1.2.3 From 3be448a3ba06cedd9edcfc33da92a7f94004efd1 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 11:14:35 -0400 Subject: Add more Railties notable changes [ci skip] --- guides/source/5_1_release_notes.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index be978295e2..cb01c6d6df 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -255,6 +255,10 @@ Please refer to the [Changelog][railties] for detailed changes. ### Notable changes +* Added a shared section to `config/secrets.yml` that will be loaded for all + environments. + ([commit](https://github.com/rails/rails/commit/e530534265d2c32b5c5f772e81cb9002dcf5e9cf)) + * The config file `secrets.yml` is now loaded in with all keys as symbols. ([Pull Request](https://github.com/rails/rails/pull/26929)) @@ -269,6 +273,10 @@ Please refer to the [Changelog][railties] for detailed changes. to the rails/webpacker gem. ([Pull Request](https://github.com/rails/rails/pull/27288)) +* Initialize Git repo when generating new app, if option `--skip-git` is not + provided. + ([Pull Request](https://github.com/rails/rails/pull/27632)) + * Add encrypted secrets in `config/secrets.yml.enc`. ([Pull Request](https://github.com/rails/rails/pull/28038)) -- cgit v1.2.3 From fd7ed5c07db51f5d7053d5c831186ed8c212d831 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 11:15:31 -0400 Subject: Remove unused heading [ci skip] --- guides/source/5_1_release_notes.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index cb01c6d6df..ed6802e457 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -251,8 +251,6 @@ Please refer to the [Changelog][railties] for detailed changes. * Remove -j (--javascript) option from `rails new` command. ([Pull Request](https://github.com/rails/rails/pull/28546)) -### Deprecations - ### Notable changes * Added a shared section to `config/secrets.yml` that will be loaded for all -- cgit v1.2.3 From 295b2025d8eddbc7fbfbfceac0ea4f90fe34da69 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 12:28:14 -0400 Subject: Use parameters, not params Reads better to use the full word. [ci skip] --- guides/source/5_1_release_notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index ed6802e457..a37e2b01ad 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -101,8 +101,8 @@ Secrets will be decrypted in production, using a key stored either in the [Pull Request](https://github.com/rails/rails/pull/27825) -Allows specifying common params used for all methods in a mailer class -to share instance variables, headers and other common setup. +Allows specifying common parameters used for all methods in a mailer class in +order to share instance variables, headers and other common setup. ``` ruby class InvitationsMailer < ApplicationMailer -- cgit v1.2.3 From 269e11598ce09a61a9ccbb0ec81eed9424610283 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 12:48:07 -0400 Subject: Add Action View info to 5.1 release notes [ci skip] --- guides/source/5_1_release_notes.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index a37e2b01ad..9a810368b1 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -314,10 +314,33 @@ Please refer to the [Changelog][action-view] for detailed changes. ### Removals +* Removed deprecated `#original_exception` in `ActionView::Template::Error`. + ([commit](https://github.com/rails/rails/commit/b9ba263e5aaa151808df058f5babfed016a1879f)) + +* Remove the option `encode_special_chars` misnomer from `strip_tags`. + ([Pull Request](https://github.com/rails/rails/pull/28061)) + ### Deprecations +* Deprecated Erubis ERB handler in favor of Erubi. + ([Pull Request](https://github.com/rails/rails/pull/27757)) + ### Notable changes +* Raw template handler (the default template handler in Rails 5) now outputs + HTML-safe strings. + ([commit](https://github.com/rails/rails/commit/1de0df86695f8fa2eeae6b8b46f9b53decfa6ec8)) + +* Change `datetime_field` and `datetime_field_tag` to generate `datetime-local` + fields. + ([Pull Request](https://github.com/rails/rails/pull/28061)) + +* New Builder-style syntax for HTML tags (`tag.div`, `tag.br`, etc.) + ([Pull Request](https://github.com/rails/rails/pull/25543)) + +* Add `form_with` to unify `form_tag` and `form_for` usage. + ([Pull Request](https://github.com/rails/rails/pull/26976)) + Action Mailer ------------- -- cgit v1.2.3 From 0dd40fe72cfcf53b475a4084d61e9e931417c29e Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sun, 23 Apr 2017 13:03:01 -0400 Subject: secrets.yml --> config/secrets.yml [ci skip] --- guides/source/5_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 9a810368b1..ffa18f1a2b 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -257,7 +257,7 @@ Please refer to the [Changelog][railties] for detailed changes. environments. ([commit](https://github.com/rails/rails/commit/e530534265d2c32b5c5f772e81cb9002dcf5e9cf)) -* The config file `secrets.yml` is now loaded in with all keys as symbols. +* The config file `config/secrets.yml` is now loaded in with all keys as symbols. ([Pull Request](https://github.com/rails/rails/pull/26929)) * Removed jquery-rails from default stack. rails-ujs, which is shipped -- cgit v1.2.3 From deba47799ff905f778e0c98a015789a1327d5087 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Tue, 25 Apr 2017 17:44:54 -0700 Subject: Describe the changes in transactional tests --- guides/source/5_1_release_notes.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index ffa18f1a2b..a0fa1680c4 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -225,6 +225,37 @@ can generate form tags based on URLs, scopes or models. ``` +Incompatibilities +----------------- + +The following changes may require immediate action upon upgrade. + +### Transactional tests with multiple connections + +Transactional tests now wrap all Active Record connections in database +transactions. + +When a test spawns additional threads, and those threads obtain database +connections, those connections are now handled specially: + +The threads will share a single connection, which is inside the managed +transaction. This ensures all threads see the database in the same +state, ignoring the outermost transaction. Previously, such additional +connections were unable to see the fixture rows, for example. + +When a thread enters a nested transaction, it will temporarily obtain +exclusive use of the connection, to maintain isolation. + +If your tests currently rely on obtaining a separate, +outside-of-transaction, connection in a spawned thread, you'll need to +switch to more explicit connection management. + +If your tests spawn threads and those threads interact while also using +explicit database transactions, this change may introduce a deadlock. + +The easy way to opt out of this new behavior is to disable transactional +tests on any test cases it affects. + Railties -------- -- cgit v1.2.3 From b6ac50b3ee2ff51203774cc0c2647a437237f396 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 27 Apr 2017 01:57:03 +0900 Subject: s/broadcasing/broadcasting/ [ci skip] --- guides/source/5_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index a0fa1680c4..9c1e6e7e46 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -324,7 +324,7 @@ Please refer to the [Changelog][action-cable] for detailed changes. * Permit same-origin connections by default. ([commit](https://github.com/rails/rails/commit/dae404473409fcab0e07976aec626df670e52282)) -* Add `ActiveSupport::Notifications` hook for broadcasing data. +* Add `ActiveSupport::Notifications` hook for broadcasting data. ([Pull Request](https://github.com/rails/rails/pull/24988)) Action Pack -- cgit v1.2.3 From 80c58a8d905485e685ac3855029b6016738a61c5 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Thu, 27 Apr 2017 00:04:08 +0200 Subject: Some improvements in the 5.1 release notes [ci skip] --- guides/source/5_1_release_notes.md | 60 ++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 28 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 9c1e6e7e46..503498af11 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -40,7 +40,7 @@ Major Features [Pull Request](https://github.com/rails/rails/pull/26836) -Rails 5.1 will allow managing JavaScript dependencies +Rails 5.1 allows managing JavaScript dependencies from NPM via Yarn. This will make it easy to use libraries like React, VueJS or any other library from NPM world. The Yarn support is integrated with the asset pipeline so that all dependencies will work seamlessly with the @@ -70,14 +70,14 @@ offerings. It is no longer required, as the UJS has been rewritten to use plain, vanilla JavaScript. This code now ships inside of Action View as `rails-ujs`. -You can still use the jQuery version if needed, but it is no longer required by default. +You can still use jQuery if needed, but it is no longer required by default. ### System tests [Pull Request](https://github.com/rails/rails/pull/26703) Rails 5.1 has baked-in support for writing Capybara tests, in the form of -System tests. You need no longer worry about configuring Capybara and +System tests. You no longer need to worry about configuring Capybara and database cleaning strategies for such tests. Rails 5.1 provides a wrapper for running tests in Chrome with additional features such as failure screenshots. @@ -86,7 +86,7 @@ screenshots. [Pull Request](https://github.com/rails/rails/pull/28038) -Rails will now allow management of application secrets in a secure way, +Rails now allows management of application secrets in a secure way, building on top of the [sekrets](https://github.com/ahoward/sekrets) gem. Run `bin/rails secrets:setup` to setup a new encrypted secrets file. This will @@ -106,33 +106,24 @@ order to share instance variables, headers and other common setup. ``` ruby class InvitationsMailer < ApplicationMailer - before_action { @inviter, @invitee = params[:inviter], params[:invitee] } before_action { @account = params[:inviter].account } def account_invitation mail subject: "#{@inviter.name} invited you to their Basecamp (#{@account.name})" end - - def project_invitation - @project = params[:project] - @summarizer = ProjectInvitationSummarizer.new(@project.bucket) - - mail subject: "#{@inviter.name.familiar} added you to a project in Basecamp (#{@account.name})" - end end -InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later +InvitationsMailer.with(inviter: person_a, invitee: person_b) + .account_invitation.deliver_later ``` ### Direct & resolved routes [Pull Request](https://github.com/rails/rails/pull/23138) -Rails 5.1 has added two new methods, `resolve` and `direct`, to the routing -DSL. - -The `resolve` method allows customizing polymorphic mapping of models. +Rails 5.1 adds two new methods, `resolve` and `direct`, to the routing +DSL. The `resolve` method allows customizing polymorphic mapping of models. ``` ruby resource :basket @@ -181,44 +172,57 @@ Before Rails 5.1, there were two interfaces for handling HTML forms: Rails 5.1 combines both of these interfaces with `form_with`, and can generate form tags based on URLs, scopes or models. -``` erb -# Using just a URL: +Using just a URL: +``` erb <%= form_with url: posts_path do |form| %> <%= form.text_field :title %> <% end %> -# => +<%# Will generate %> +
+``` -# Adding a scope prefixes the input field names: +Adding a scope prefixes the input field names: +``` erb <%= form_with scope: :post, url: posts_path do |form| %> <%= form.text_field :title %> <% end %> -# => + +<%# Will generate %> +
+``` -# Using a model infers both the URL and scope: +Using a model infers both the URL and scope: +``` erb <%= form_with model: Post.new do |form| %> <%= form.text_field :title %> <% end %> -# => + +<%# Will generate %> +
+``` -# An existing model makes an update form and fills out field values: +An existing model makes an update form and fills out field values: +``` erb <%= form_with model: Post.first do |form| %> <%= form.text_field :title %> <% end %> -# => + +<%# Will generate %> +
@@ -264,7 +268,7 @@ Please refer to the [Changelog][railties] for detailed changes. ### Removals * Remove deprecated `config.static_cache_control`. - ([commit](https://github.com/rails/rails/commit/c861decd44198f8d7d774ee6a74194d1ac1a5a13) + ([commit](https://github.com/rails/rails/commit/c861decd44198f8d7d774ee6a74194d1ac1a5a13)) * Remove deprecated `config.serve_static_files`. ([commit](https://github.com/rails/rails/commit/0129ca2eeb6d5b2ea8c6e6be38eeb770fe45f1fa)) @@ -298,7 +302,7 @@ Please refer to the [Changelog][railties] for detailed changes. * Add Yarn support in new apps with a yarn binstub and package.json. ([Pull Request](https://github.com/rails/rails/pull/26836)) -* Add Webpack support in new apps via the --webpack option, which will delegate +* Add Webpack support in new apps via the `--webpack` option, which will delegate to the rails/webpacker gem. ([Pull Request](https://github.com/rails/rails/pull/27288)) -- cgit v1.2.3 From 377a07958904633b882b277ff51ada08e1e4d720 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Thu, 27 Apr 2017 00:45:06 +0200 Subject: Add some items to the release notes [ci skip] --- guides/source/5_1_release_notes.md | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 503498af11..a24e8766d3 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -338,10 +338,34 @@ Please refer to the [Changelog][action-pack] for detailed changes. ### Removals +* Removed support to non-keyword arguments in `#process`, `#get`, `#post`, + `#patch`, `#put`, `#delete`, and `#head` for the `ActionDispatch::IntegrationTest` + and `ActionController::TestCase` classes. + ([Commit](https://github.com/rails/rails/commit/98b8309569a326910a723f521911e54994b112fb), + [Commit](https://github.com/rails/rails/commit/de9542acd56f60d281465a59eac11e15ca8b3323)) + +* Removed deprecated `ActionDispatch::Callbacks.to_prepare` and + `ActionDispatch::Callbacks.to_cleanup`. + ([Commit](https://github.com/rails/rails/commit/3f2b7d60a52ffb2ad2d4fcf889c06b631db1946b)) + +* Removed deprecated methods related to controller filters. + ([Commit](https://github.com/rails/rails/commit/d7be30e8babf5e37a891522869e7b0191b79b757)) + ### Deprecations +* Deprecated `config.action_controller.raise_on_unfiltered_parameters`. + It doesn't have any effect in Rails 5.1. + ([Commit](https://github.com/rails/rails/commit/c6640fb62b10db26004a998d2ece98baede509e5)) + ### Notable changes +* Added the `direct` and `resolve` methods to the routing DSL. + ([Pull Request](https://github.com/rails/rails/pull/23138)) + +* Added a new `ActionDispatch::SystemTestCase` class to write system tests in + your applications. + ([Pull Request](https://github.com/rails/rails/pull/26703)) + Action View ------------- @@ -413,6 +437,10 @@ Please refer to the [Changelog][active-record] for detailed changes. ### Notable changes +* Transactional tests now wrap all Active Record connections in database + transactions. + ([Pull Request](https://github.com/rails/rails/pull/28726)) + * Skipped comments in the output of `mysqldump` command by default. ([Pull Request](https://github.com/rails/rails/pull/23301)) @@ -475,10 +503,30 @@ Please refer to the [Changelog][active-support] for detailed changes. ### Removals +* Removed the `ActiveSupport::Concurrency::Latch` class. + ([Commit](https://github.com/rails/rails/commit/0d7bd2031b4054fbdeab0a00dd58b1b08fb7fea6)) + +* Removed `halt_callback_chains_on_return_false`. + ([Commit](https://github.com/rails/rails/commit/4e63ce53fc25c3bc15c5ebf54bab54fa847ee02a)) + +* Removed deprecated behavior that halts callbacks when the return is false. + ([Commit](https://github.com/rails/rails/commit/3a25cdca3e0d29ee2040931d0cb6c275d612dffe)) + ### Deprecations +* The top level `HashWithIndifferentAccess` class has been softly deprecated + in favor of the `ActiveSupport::HashWithIndifferentAccess` one. + ([Pull request](https://github.com/rails/rails/pull/28157)) + ### Notable changes +* Fixed duration parsing and traveling to make it consistent across DST changes. + ([Commit](https://github.com/rails/rails/commit/8931916f4a1c1d8e70c06063ba63928c5c7eab1e), + [Pull Request](https://github.com/rails/rails/pull/26597)) + +* Updated Unicode to version 9.0.0. + ([Pull Request](https://github.com/rails/rails/pull/27822)) + * Added `Module#delegate_missing_to` to delegate method calls not defined for the current object to a proxy object. ([Pull Request](https://github.com/rails/rails/pull/23930)) @@ -487,6 +535,12 @@ Please refer to the [Changelog][active-support] for detailed changes. of the current date & time. ([Pull Request](https://github.com/rails/rails/pull/24930)) +* Introduced the `assert_changes` and `assert_no_changes` method for tests. + ([Pull Request](https://github.com/rails/rails/pull/25393)) + +* The `travel` and `travel_to` methods now raise on nested calls. + ([Pull Request](https://github.com/rails/rails/pull/24890)) + Credits ------- -- cgit v1.2.3 From 5b515518212b67b9a20321f1d5e9e23f73670503 Mon Sep 17 00:00:00 2001 From: claudiob Date: Wed, 26 Apr 2017 16:46:32 -0700 Subject: More release notes for Rails 5.1 [ci skip] @dhh most changes that I mentioned in the talk were already there: https://speakerdeck.com/claudiob/rails-5-dot-1-upcoming-features I just added a few that were missing. --- guides/source/5_1_release_notes.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index a24e8766d3..b81d6011ed 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -313,6 +313,9 @@ Please refer to the [Changelog][railties] for detailed changes. * Add encrypted secrets in `config/secrets.yml.enc`. ([Pull Request](https://github.com/rails/rails/pull/28038)) +* Display railtie class name in `rails initializers`. + ([Pull Request](https://github.com/rails/rails/pull/25257)) + Action Cable ----------- @@ -353,6 +356,9 @@ Please refer to the [Changelog][action-pack] for detailed changes. ### Deprecations +* Deprecated `:controller` and `:action` path parameters. + ([Pull Request](https://github.com/rails/rails/pull/23980)) + * Deprecated `config.action_controller.raise_on_unfiltered_parameters`. It doesn't have any effect in Rails 5.1. ([Commit](https://github.com/rails/rails/commit/c6640fb62b10db26004a998d2ece98baede509e5)) @@ -400,6 +406,9 @@ Please refer to the [Changelog][action-view] for detailed changes. * Add `form_with` to unify `form_tag` and `form_for` usage. ([Pull Request](https://github.com/rails/rails/pull/26976)) +* Add `check_parameters` option to `current_page?`. + ([Pull Request](https://github.com/rails/rails/pull/27549)) + Action Mailer ------------- @@ -437,6 +446,15 @@ Please refer to the [Changelog][active-record] for detailed changes. ### Notable changes +* Change Default Primary Keys to BIGINT. + ([Pull Request](https://github.com/rails/rails/pull/26266)) + +* Virtual/generated column support for MySQL 5.7.5+ and MariaDB 5.2.0+. + ([Commit](https://github.com/rails/rails/commit/65bf1c60053e727835e06392d27a2fb49665484c)) + +* Added support for limits in batch processing. + ([Commit](https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7)) + * Transactional tests now wrap all Active Record connections in database transactions. ([Pull Request](https://github.com/rails/rails/pull/28726)) @@ -452,6 +470,9 @@ Please refer to the [Changelog][active-record] for detailed changes. * Pass `"-v ON_ERROR_STOP=1"` flag with `psql` command to not suppress SQL errors. ([Pull Request](https://github.com/rails/rails/pull/24773)) +* Add `ActiveRecord::Base.connection_pool.stat`. + ([Pull Request](https://github.com/rails/rails/pull/26988)) + Active Model ------------ @@ -518,6 +539,9 @@ Please refer to the [Changelog][active-support] for detailed changes. in favor of the `ActiveSupport::HashWithIndifferentAccess` one. ([Pull request](https://github.com/rails/rails/pull/28157)) +* Deprecate passing string to `:if` and `:unless` conditional options on `set_callback` and `skip_callback`. + ([Commit](https://github.com/rails/rails/commit/0952552) + ### Notable changes * Fixed duration parsing and traveling to make it consistent across DST changes. @@ -527,6 +551,9 @@ Please refer to the [Changelog][active-support] for detailed changes. * Updated Unicode to version 9.0.0. ([Pull Request](https://github.com/rails/rails/pull/27822)) +* Add Duration#before and #after as aliases for #ago and #since. + ([Pull Request](https://github.com/rails/rails/pull/27721)) + * Added `Module#delegate_missing_to` to delegate method calls not defined for the current object to a proxy object. ([Pull Request](https://github.com/rails/rails/pull/23930)) @@ -541,6 +568,9 @@ Please refer to the [Changelog][active-support] for detailed changes. * The `travel` and `travel_to` methods now raise on nested calls. ([Pull Request](https://github.com/rails/rails/pull/24890)) +* Update `DateTime#change` to support usec and nsec. + ([Pull Request](https://github.com/rails/rails/pull/28242)) + Credits ------- -- cgit v1.2.3 From f52cdaac6336f99d13622ff9bda556a3124a4121 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Wed, 26 Apr 2017 20:14:08 -0400 Subject: Pluralize methods [ci skip] --- guides/source/5_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index b81d6011ed..0f6167f1ee 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -562,7 +562,7 @@ Please refer to the [Changelog][active-support] for detailed changes. of the current date & time. ([Pull Request](https://github.com/rails/rails/pull/24930)) -* Introduced the `assert_changes` and `assert_no_changes` method for tests. +* Introduced the `assert_changes` and `assert_no_changes` methods for tests. ([Pull Request](https://github.com/rails/rails/pull/25393)) * The `travel` and `travel_to` methods now raise on nested calls. -- cgit v1.2.3 From 2c691f55adbad7a0600f3dc80c371bbbc3fd6b9d Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Thu, 27 Apr 2017 14:09:56 -0700 Subject: Added some more release notes for Active Record [ci skip] --- guides/source/5_1_release_notes.md | 76 +++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 0f6167f1ee..759a445fd8 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -442,8 +442,73 @@ Please refer to the [Changelog][active-record] for detailed changes. ### Removals +* Removed support for passing arguments and block at the same time to + `ActiveRecord::QueryMethods#select`. + ([Commit](https://github.com/rails/rails/commit/4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce)) + +* Removed deprecated `activerecord.errors.messages.restrict_dependent_destroy.one` and + `activerecord.errors.messages.restrict_dependent_destroy.many` i18n scopes. + ([Commit](https://github.com/rails/rails/commit/00e3973a311)) + +* Removed deprecated force reload argument in singular and collection association readers. + ([Commit](https://github.com/rails/rails/commit/09cac8c67af)) + +* Removed deprecated support to passing a column to `#quote`. + ([Commit](https://github.com/rails/rails/commit/e646bad5b7c)) + +* Removed deprecated `name` arguments from `#tables`. + ([Commit](https://github.com/rails/rails/commit/d5be101dd02214468a27b6839ffe338cfe8ef5f3)) + +* Removed deprecated behavior of `#tables` and `#table_exists?` to return tables and views + to return only tables and not views. + ([Commit](https://github.com/rails/rails/commit/5973a984c369a63720c2ac18b71012b8347479a8)) + +* Removed deprecated `original_exception` argument in `ActiveRecord::StatementInvalid#initialize` + and `ActiveRecord::StatementInvalid#original_exception`. + ([Commit](https://github.com/rails/rails/commit/bc6c5df4699d3f6b4a61dd12328f9e0f1bd6cf46)) + +* Removed deprecated support of passing a class as a value in a query. + ([Commit](https://github.com/rails/rails/commit/b4664864c972463c7437ad983832d2582186e886)) + +* Removed deprecated support to query using commas on LIMIT. + ([Commit](https://github.com/rails/rails/commit/fc3e67964753fb5166ccbd2030d7382e1976f393)) + +* Removed deprecated `conditions` parameter from `#destroy_all`. + ([Commit](https://github.com/rails/rails/commit/d31a6d1384cd740c8518d0bf695b550d2a3a4e9b)) + +* Removed deprecated `conditions` parameter from `#delete_all`. + ([Commit](https://github.com/rails/rails/pull/27503/commits/e7381d289e4f8751dcec9553dcb4d32153bd922b)) + +* Removed deprecated method `#load_schema_for` in favor of `#load_schema`. + ([Commit](https://github.com/rails/rails/commit/419e06b56c3b0229f0c72d3e4cdf59d34d8e5545)) + +* Removed deprecated `#raise_in_transactional_callbacks` configuration. + ([Commit](https://github.com/rails/rails/commit/8029f779b8a1dd9848fee0b7967c2e0849bf6e07)) + +* Removed deprecated `#use_transactional_fixtures` configuration. + ([Commit](https://github.com/rails/rails/commit/3955218dc163f61c932ee80af525e7cd440514b3)) + ### Deprecations +* Deprecated `error_on_ignored_order_or_limit` flag in favor of + `error_on_ignored_order`. + ([Commit](https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7)) + +* Deprecated `sanitize_conditions` in favor of `sanitize_sql`. + ([Pull Request](https://github.com/rails/rails/pull/25999)) + +* Deprecated `supports_migrations?` on connection adapters. + ([Pull Request](https://github.com/rails/rails/pull/28172)) + +* Deprecated `Migrator.schema_migrations_table_name`, use `SchemaMigration.table_name` instead. + ([Pull Request](https://github.com/rails/rails/pull/28351)) + +* Deprecated using `#quoted_id` in quoting and type casting. + ([Pull Request](https://github.com/rails/rails/pull/27962)) + +* Deprecated passing `default` argument to `#index_name_exists?`. + ([Pull Request](https://github.com/rails/rails/pull/26930)) + ### Notable changes * Change Default Primary Keys to BIGINT. @@ -473,6 +538,13 @@ Please refer to the [Changelog][active-record] for detailed changes. * Add `ActiveRecord::Base.connection_pool.stat`. ([Pull Request](https://github.com/rails/rails/pull/26988)) +* Inheriting directly from `ActiveRecord::Migration` raises an error. + Specify the Rails version for which the migration was written for. + ([Commit](https://github.com/rails/rails/commit/249f71a22ab21c03915da5606a063d321f04d4d3)) + +* An error is raised when `through` association has ambiguous reflection name. + ([Commit](https://github.com/rails/rails/commit/0944182ad7ed70d99b078b22426cbf844edd3f61)) + Active Model ------------ @@ -537,9 +609,9 @@ Please refer to the [Changelog][active-support] for detailed changes. * The top level `HashWithIndifferentAccess` class has been softly deprecated in favor of the `ActiveSupport::HashWithIndifferentAccess` one. - ([Pull request](https://github.com/rails/rails/pull/28157)) + ([Pull Request](https://github.com/rails/rails/pull/28157)) -* Deprecate passing string to `:if` and `:unless` conditional options on `set_callback` and `skip_callback`. +* Deprecated passing string to `:if` and `:unless` conditional options on `set_callback` and `skip_callback`. ([Commit](https://github.com/rails/rails/commit/0952552) ### Notable changes -- cgit v1.2.3 From 4c18f050b69c4795097255003fe9bb5a650ba7c9 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Thu, 27 Apr 2017 14:09:56 -0700 Subject: Fix indentation [ci skip] --- guides/source/5_1_release_notes.md | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 759a445fd8..73067d29f2 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -442,30 +442,30 @@ Please refer to the [Changelog][active-record] for detailed changes. ### Removals -* Removed support for passing arguments and block at the same time to - `ActiveRecord::QueryMethods#select`. - ([Commit](https://github.com/rails/rails/commit/4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce)) +* Removed support for passing arguments and block at the same time to + `ActiveRecord::QueryMethods#select`. + ([Commit](https://github.com/rails/rails/commit/4fc3366d9d99a0eb19e45ad2bf38534efbf8c8ce)) -* Removed deprecated `activerecord.errors.messages.restrict_dependent_destroy.one` and +* Removed deprecated `activerecord.errors.messages.restrict_dependent_destroy.one` and `activerecord.errors.messages.restrict_dependent_destroy.many` i18n scopes. - ([Commit](https://github.com/rails/rails/commit/00e3973a311)) + ([Commit](https://github.com/rails/rails/commit/00e3973a311)) -* Removed deprecated force reload argument in singular and collection association readers. - ([Commit](https://github.com/rails/rails/commit/09cac8c67af)) +* Removed deprecated force reload argument in singular and collection association readers. + ([Commit](https://github.com/rails/rails/commit/09cac8c67af)) -* Removed deprecated support to passing a column to `#quote`. - ([Commit](https://github.com/rails/rails/commit/e646bad5b7c)) +* Removed deprecated support to passing a column to `#quote`. + ([Commit](https://github.com/rails/rails/commit/e646bad5b7c)) -* Removed deprecated `name` arguments from `#tables`. - ([Commit](https://github.com/rails/rails/commit/d5be101dd02214468a27b6839ffe338cfe8ef5f3)) +* Removed deprecated `name` arguments from `#tables`. + ([Commit](https://github.com/rails/rails/commit/d5be101dd02214468a27b6839ffe338cfe8ef5f3)) -* Removed deprecated behavior of `#tables` and `#table_exists?` to return tables and views - to return only tables and not views. - ([Commit](https://github.com/rails/rails/commit/5973a984c369a63720c2ac18b71012b8347479a8)) +* Removed deprecated behavior of `#tables` and `#table_exists?` to return tables and views + to return only tables and not views. + ([Commit](https://github.com/rails/rails/commit/5973a984c369a63720c2ac18b71012b8347479a8)) -* Removed deprecated `original_exception` argument in `ActiveRecord::StatementInvalid#initialize` - and `ActiveRecord::StatementInvalid#original_exception`. - ([Commit](https://github.com/rails/rails/commit/bc6c5df4699d3f6b4a61dd12328f9e0f1bd6cf46)) +* Removed deprecated `original_exception` argument in `ActiveRecord::StatementInvalid#initialize` + and `ActiveRecord::StatementInvalid#original_exception`. + ([Commit](https://github.com/rails/rails/commit/bc6c5df4699d3f6b4a61dd12328f9e0f1bd6cf46)) * Removed deprecated support of passing a class as a value in a query. ([Commit](https://github.com/rails/rails/commit/b4664864c972463c7437ad983832d2582186e886)) @@ -490,12 +490,12 @@ Please refer to the [Changelog][active-record] for detailed changes. ### Deprecations -* Deprecated `error_on_ignored_order_or_limit` flag in favor of - `error_on_ignored_order`. - ([Commit](https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7)) +* Deprecated `error_on_ignored_order_or_limit` flag in favor of + `error_on_ignored_order`. + ([Commit](https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7)) -* Deprecated `sanitize_conditions` in favor of `sanitize_sql`. - ([Pull Request](https://github.com/rails/rails/pull/25999)) +* Deprecated `sanitize_conditions` in favor of `sanitize_sql`. + ([Pull Request](https://github.com/rails/rails/pull/25999)) * Deprecated `supports_migrations?` on connection adapters. ([Pull Request](https://github.com/rails/rails/pull/28172)) -- cgit v1.2.3 From 8d79eed3e99aa503dfbd37fe262c047f3daf068d Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Thu, 27 Apr 2017 18:28:01 -0400 Subject: Small grammar fix [ci skip] --- guides/source/5_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index 73067d29f2..ac26b2994a 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -453,7 +453,7 @@ Please refer to the [Changelog][active-record] for detailed changes. * Removed deprecated force reload argument in singular and collection association readers. ([Commit](https://github.com/rails/rails/commit/09cac8c67af)) -* Removed deprecated support to passing a column to `#quote`. +* Removed deprecated support for passing a column to `#quote`. ([Commit](https://github.com/rails/rails/commit/e646bad5b7c)) * Removed deprecated `name` arguments from `#tables`. -- cgit v1.2.3 From 7902c01d1faa27fb9fa0f03bdfb90725780cf540 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Thu, 27 Apr 2017 21:28:45 -0400 Subject: Small grammar fix [ci skip] --- guides/source/5_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index ac26b2994a..fc79287d4c 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -341,7 +341,7 @@ Please refer to the [Changelog][action-pack] for detailed changes. ### Removals -* Removed support to non-keyword arguments in `#process`, `#get`, `#post`, +* Removed support for non-keyword arguments in `#process`, `#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head` for the `ActionDispatch::IntegrationTest` and `ActionController::TestCase` classes. ([Commit](https://github.com/rails/rails/commit/98b8309569a326910a723f521911e54994b112fb), -- cgit v1.2.3 From df6aef2518884f65871f719125a972790518fd17 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sat, 29 Apr 2017 13:33:37 +0900 Subject: Remove entries included in 5.0 [ci skip] * `Permit same-origin connections by default` was backported in db70978, 549d732. * `Deprecated `:controller` and `:action` path parameters` was included in 6520ea5. * `Exception handling: use `rescue_from` was included in 6b54316. --- guides/source/5_1_release_notes.md | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index fc79287d4c..ecdb951870 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -328,9 +328,6 @@ Please refer to the [Changelog][action-cable] for detailed changes. with multiple applications. ([Pull Request](https://github.com/rails/rails/pull/27425)) -* Permit same-origin connections by default. - ([commit](https://github.com/rails/rails/commit/dae404473409fcab0e07976aec626df670e52282)) - * Add `ActiveSupport::Notifications` hook for broadcasting data. ([Pull Request](https://github.com/rails/rails/pull/24988)) @@ -356,9 +353,6 @@ Please refer to the [Changelog][action-pack] for detailed changes. ### Deprecations -* Deprecated `:controller` and `:action` path parameters. - ([Pull Request](https://github.com/rails/rails/pull/23980)) - * Deprecated `config.action_controller.raise_on_unfiltered_parameters`. It doesn't have any effect in Rails 5.1. ([Commit](https://github.com/rails/rails/commit/c6640fb62b10db26004a998d2ece98baede509e5)) @@ -416,10 +410,6 @@ Please refer to the [Changelog][action-mailer] for detailed changes. ### Notable changes -* Exception handling: use `rescue_from` to handle exceptions raised by - mailer actions, by message delivery, and by deferred delivery jobs. - ([commit](https://github.com/rails/rails/commit/e35b98e6f5c54330245645f2ed40d56c74538902)) - * Allowed setting custom content type when attachments are included and body is set inline. ([Pull Request](https://github.com/rails/rails/pull/27227)) -- cgit v1.2.3 From 19a76b8749d961a13a4c485c110a5a35bd0825db Mon Sep 17 00:00:00 2001 From: Bart Date: Tue, 2 May 2017 10:17:08 -0400 Subject: Rails secrets is not built on but inspired by Sekrets Put wording in line with http://weblog.rubyonrails.org/2017/4/27/Rails-5-1-final/ --- guides/source/5_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/5_1_release_notes.md') diff --git a/guides/source/5_1_release_notes.md b/guides/source/5_1_release_notes.md index ecdb951870..fa92b9e5f8 100644 --- a/guides/source/5_1_release_notes.md +++ b/guides/source/5_1_release_notes.md @@ -87,7 +87,7 @@ screenshots. [Pull Request](https://github.com/rails/rails/pull/28038) Rails now allows management of application secrets in a secure way, -building on top of the [sekrets](https://github.com/ahoward/sekrets) gem. +inspired by the [sekrets](https://github.com/ahoward/sekrets) gem. Run `bin/rails secrets:setup` to setup a new encrypted secrets file. This will also generate a master key, which must be stored outside of the repository. The -- cgit v1.2.3