From b20d4453dda6121508a93ebfbe08aafc974abdd7 Mon Sep 17 00:00:00 2001 From: Rashmi Yadav Date: Sun, 19 Jan 2014 10:51:23 +0100 Subject: Spring in now under rails/spring [ci skip] --- guides/source/4_1_release_notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 924e5d90db..f408d9fdac 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -64,7 +64,7 @@ Spring is running: ``` Have a look at the -[Spring README](https://github.com/jonleighton/spring/blob/master/README.md) to +[Spring README](https://github.com/rails/spring/blob/master/README.md) to see all available features. See the [Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#spring) @@ -267,7 +267,7 @@ for detailed changes. ### Notable changes * The [Spring application - preloader](https://github.com/jonleighton/spring) is now installed + preloader](https://github.com/rails/spring) is now installed by default for new applications. It uses the development group of the Gemfile, so will not be installed in production. ([Pull Request](https://github.com/rails/rails/pull/12958)) -- cgit v1.2.3 From 9040e04c7257125aa18f685fdafb554bf0d35507 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sun, 19 Jan 2014 18:43:51 -0800 Subject: Add link to upgrade guide for full list of deprecated finders [ci skip] --- guides/source/4_1_release_notes.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 924e5d90db..c6efce8834 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -411,6 +411,9 @@ for detailed changes. * Remove implicit join references that were deprecated in 4.0. * Removed `activerecord-deprecated_finders` as a dependency. + Please see [upgrading + guide](upgrading_ruby_on_rails.html#upgrading-from-rails-3-2-to-rails-4-0-active-record) + for more info. * Removed usage of `implicit_readonly`. Please use `readonly` method explicitly to mark records as -- cgit v1.2.3 From 079ffc96c18752d069d1759f9667b7a905e506eb Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 20 Jan 2014 14:03:48 +0100 Subject: let's link to the gem README not to the upgrading guide. [ci skip] The PR #13767 added link to the upgrading guide to explain details about activerecord_deprecated-finders. However the link target features a stack of changes not releated at all. Also the relevant details are not very informative. I think we better link to the README so people can see what the gem is about and how to use it. /cc @chancancode @zzak --- guides/source/4_1_release_notes.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index e131d3348e..1980f4d4cf 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -411,8 +411,7 @@ for detailed changes. * Remove implicit join references that were deprecated in 4.0. * Removed `activerecord-deprecated_finders` as a dependency. - Please see [upgrading - guide](upgrading_ruby_on_rails.html#upgrading-from-rails-3-2-to-rails-4-0-active-record) + Please see [the gem README](https://github.com/rails/activerecord-deprecated_finders#active-record-deprecated-finders) for more info. * Removed usage of `implicit_readonly`. Please use `readonly` method -- cgit v1.2.3 From 9690bcf503e4d7bc3c2fe392c623b790c0392d5e Mon Sep 17 00:00:00 2001 From: Francis Go Date: Mon, 27 Jan 2014 17:10:21 +1100 Subject: Ruby on Rails 4.1 Release Notes: Fix spelling [ci skip] --- guides/source/4_1_release_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 1980f4d4cf..8894011580 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -585,7 +585,7 @@ for detailed changes. [More Details](upgrading_ruby_on_rails.html#changes-in-json-handling)) * Deprecated `ActiveSupport.encode_big_decimal_as_string` option. This feature has - been extracetd into the [activesupport-json_encoder](https://github.com/rails/activesupport-json_encoder) + been extracted into the [activesupport-json_encoder](https://github.com/rails/activesupport-json_encoder) gem. ([Pull Request](https://github.com/rails/rails/pull/13060) / [More Details](upgrading_ruby_on_rails.html#changes-in-json-handling)) -- cgit v1.2.3 From abe648452f04be52ee3f95031f0ea01f98fdcf40 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 27 Jan 2014 11:23:10 +0100 Subject: mention #13314 in 4.1 release notes. refs #12140. [ci skip] --- guides/source/4_1_release_notes.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 8894011580..2426046335 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -502,6 +502,9 @@ for detailed changes. * Don't create or drop the test database if RAILS_ENV is specified explicitly. +* `Relation` no longer has mutator methods like `#map!` and `#delete_if`. Convert + to an `Array` by calling `#to_a` before using these methods. ([Pull Request](https://github.com/rails/rails/pull/13314)) + Active Model ------------ -- cgit v1.2.3 From 9673d5df2764f8a2f84fc739b480f3040926c0cd Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Mon, 27 Jan 2014 13:57:25 +0100 Subject: docs, remove deprecation entry in favor of abe6484. [ci skip] --- guides/source/4_1_release_notes.md | 5 ----- 1 file changed, 5 deletions(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 2426046335..477268f4bc 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -422,11 +422,6 @@ for detailed changes. * Deprecated `quoted_locking_column` method, which isn't used anywhere. -* Deprecated the delegation of Array bang methods for associations. - To use them, instead first call `#to_a` on the association to access the - array to be acted - on. ([Pull Request](https://github.com/rails/rails/pull/12129)) - * Deprecated `ConnectionAdapters::SchemaStatements#distinct`, as it is no longer used by internals. ([Pull Request](https://github.com/rails/rails/pull/10556)) -- cgit v1.2.3 From 42566626e9f9ab8d56194a32fd7e674a20c34fb6 Mon Sep 17 00:00:00 2001 From: Kassio Borges Date: Wed, 29 Jan 2014 18:07:52 -0200 Subject: Fix documentation of new controller filters api [ci skip] The api for filters with classes change and the guides weren't updated. Now the class must respond for methods with the same name as the filter, so the `before_action` calls a `before` method, and so on. The method `#filter` has been deprecated in 4.0.0 and has been removed in 4.1.0: #7560 --- guides/source/4_1_release_notes.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 477268f4bc..7399bfb5de 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -567,6 +567,9 @@ for detailed changes. * Removed deprecated `assert_present` and `assert_blank` methods, use `assert object.blank?` and `assert object.present?` instead. +* Remove deprecated `#filter` method for filter objects, use the corresponding + method instead (e.g. `#before` for a before filter). + ### Deprecations * Deprecated `Numeric#{ago,until,since,from_now}`, the user is expected to -- cgit v1.2.3 From 6b16c2788186d45c70bd1d9fc476407e3e265439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 29 Jan 2014 22:24:48 -0200 Subject: Add `travel_back` to remove stubs from `travel` and `travel_to` --- guides/source/4_1_release_notes.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 7399bfb5de..3668ffe44c 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -607,6 +607,9 @@ for detailed changes. `Time.now` and `Date.today`. ([Pull Request](https://github.com/rails/rails/pull/12824)) +* Added `ActiveSupport::Testing::TimeHelpers#travel_back`. This method return + the current time to the original state. ([Pull Request](https://github.com/rails/rails/pull/13884)) + * Added `Numeric#in_milliseconds`, like `1.hour.in_milliseconds`, so we can feed them to JavaScript functions like `getTime()`. ([Commit](https://github.com/rails/rails/commit/423249504a2b468d7a273cbe6accf4f21cb0e643)) -- cgit v1.2.3 From fa1f20e6549f962112948f5b3c27d09ab5e5faaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 30 Jan 2014 10:13:58 -0200 Subject: Improve documentation [ci skip] --- guides/source/4_1_release_notes.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 3668ffe44c..4e75bf400c 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -607,8 +607,9 @@ for detailed changes. `Time.now` and `Date.today`. ([Pull Request](https://github.com/rails/rails/pull/12824)) -* Added `ActiveSupport::Testing::TimeHelpers#travel_back`. This method return - the current time to the original state. ([Pull Request](https://github.com/rails/rails/pull/13884)) +* Added `ActiveSupport::Testing::TimeHelpers#travel_back`. This method returns + the current time to the original state, by removing the stubs added by `travel` + and `travel_to`. ([Pull Request](https://github.com/rails/rails/pull/13884)) * Added `Numeric#in_milliseconds`, like `1.hour.in_milliseconds`, so we can feed them to JavaScript functions like -- cgit v1.2.3 From 580f0b61dc99c6854fa930a761d28a3ab08163f7 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Thu, 6 Feb 2014 11:43:16 +0100 Subject: synchronize 4.1 release notes with CHANGELOGS. [ci skip] /cc @chancancode --- guides/source/4_1_release_notes.md | 81 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 4 deletions(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 4e75bf400c..170b071df8 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -175,6 +175,8 @@ conversation.active? # => false conversation.status # => "archived" Conversation.archived # => Relation for all archived Conversations + +Conversation.statuses # => { "active" => 0, "archived" => 1 } ``` See its @@ -241,6 +243,7 @@ unless they use `xhr`. Upgrade your tests to be explicit about expecting XmlHttpRequests. Instead of `post :create, format: :js`, switch to the explicit `xhr :post, :create, format: :js`. + Railties -------- @@ -278,7 +281,7 @@ for detailed changes. * Exposed `MiddlewareStack#unshift` to environment configuration. ([Pull Request](https://github.com/rails/rails/pull/12479)) -* Add `Application#message_verifier` method to return a message +* Added `Application#message_verifier` method to return a message verifier. ([Pull Request](https://github.com/rails/rails/pull/12995)) * The `test_help.rb` file which is required by the default generated test @@ -288,6 +291,7 @@ for detailed changes. with `config.active_record.maintain_test_schema = false`. ([Pull Request](https://github.com/rails/rails/pull/13528)) + Action Pack ----------- @@ -335,6 +339,18 @@ for detailed changes. * Separated Action View completely from Action Pack. ([Pull Request](https://github.com/rails/rails/pull/11032)) +* Log which keys were affected by deep + munge. ([Pull Request](https://github.com/rails/rails/pull/13813)) + +* New config option `config.action_dispatch.perform_deep_munge` to opt out of + params "deep munging" that was used to address security vulnerability + CVE-2013-0155. ([Pull Request](https://github.com/rails/rails/pull/13188)) + +* Added `:serializer` option for `config.session_store :cookie_store`. This + changes default serializer when using + `:cookie_store`. ([Pull Request](https://github.com/rails/rails/pull/13692)) + + Action Mailer ------------- @@ -344,9 +360,13 @@ for detailed changes. ### Notable changes +* Added mailer previews feature based on 37 Signals mail_view + gem. ([Commit](https://github.com/rails/rails/commit/d6dec7fcb6b8fddf8c170182d4fe64ecfc7b2261)) + * Instrument the generation of Action Mailer messages. The time it takes to generate a message is written to the log. ([Pull Request](https://github.com/rails/rails/pull/12556)) + Active Record ------------- @@ -495,11 +515,32 @@ for detailed changes. object. Helper methods used by multiple fixtures should be defined on modules included in `ActiveRecord::FixtureSet.context_class`. ([Pull Request](https://github.com/rails/rails/pull/13022)) -* Don't create or drop the test database if RAILS_ENV is specified explicitly. +* Don't create or drop the test database if RAILS_ENV is specified + explicitly. ([Pull Request](https://github.com/rails/rails/pull/13629)) * `Relation` no longer has mutator methods like `#map!` and `#delete_if`. Convert to an `Array` by calling `#to_a` before using these methods. ([Pull Request](https://github.com/rails/rails/pull/13314)) +* `find_in_batches`, `find_each`, `Result#each` and `Enumerable#index_by` now + return an `Enumerator` that can calculate its + size. ([Pull Request](https://github.com/rails/rails/pull/13938)) + +* `scope` and `endum` now raise on "dangerous" name + conflicts. ([Pull Request](https://github.com/rails/rails/pull/13450)) + +* `second` through `fifth` methods act like the `first` + finder. ([Pull Request](https://github.com/rails/rails/pull/13757)) + +* Make `touch` fire the `after_commit` and `after_rollback` + callbacks. ([Pull Request](https://github.com/rails/rails/pull/12031)) + +* Enable partial indexes for `sqlite >= + 3.8.0`. ([Pull Request](https://github.com/rails/rails/pull/13350)) + +* Make `change_column_null` + revertable. ([Commit](https://github.com/rails/rails/commit/724509a9d5322ff502aefa90dd282ba33a281a96)) + + Active Model ------------ @@ -517,6 +558,13 @@ for detailed changes. * Added new API methods `reset_changes` and `changes_applied` to `ActiveModel::Dirty` that control changes state. +* Ability to specify multiple contexts when defining a + validation. ([Pull Request](https://github.com/rails/rails/pull/13754)) + +* `attribute_changed?` now accepts a hash to check if the attribute was changed + `:from` and/or `:to` a given + value. ([Pull Request](https://github.com/rails/rails/pull/13131)) + Active Support -------------- @@ -570,6 +618,9 @@ for detailed changes. * Remove deprecated `#filter` method for filter objects, use the corresponding method instead (e.g. `#before` for a before filter). +* Removed 'cow' => 'kine' irregular inflection from default + inflections. ([Commit](https://github.com/rails/rails/commit/c300dca9963bda78b8f358dbcb59cabcdc5e1dc9)) + ### Deprecations * Deprecated `Numeric#{ago,until,since,from_now}`, the user is expected to @@ -591,6 +642,9 @@ for detailed changes. ([Pull Request](https://github.com/rails/rails/pull/13060) / [More Details](upgrading_ruby_on_rails.html#changes-in-json-handling)) +* Deprecate custom `BigDecimal` + serialization. ([Pull Request](https://github.com/rails/rails/pull/13911)) + ### Notable changes * `ActiveSupport`'s JSON encoder has been rewritten to take advantage of the @@ -620,11 +674,30 @@ for detailed changes. `at_middle_of_day` as aliases. ([Pull Request](https://github.com/rails/rails/pull/10879)) +* Added `Date#all_week/month/quarter/year` for generating date + ranges. ([Pull Request](https://github.com/rails/rails/pull/9685)) + +* Added `Time.zone.yesterday` and + `Time.zone.tomorrow`. ([Pull Request](https://github.com/rails/rails/pull/12822)) + * Added `String#remove(pattern)` as a short-hand for the common pattern of `String#gsub(pattern,'')`. ([Commit](https://github.com/rails/rails/commit/5da23a3f921f0a4a3139495d2779ab0d3bd4cb5f)) -* Removed 'cow' => 'kine' irregular inflection from default - inflections. ([Commit](https://github.com/rails/rails/commit/c300dca9963bda78b8f358dbcb59cabcdc5e1dc9)) +* Added `Hash#compact` and `Hash#compact!` for removing items with nil value + from hash. ([Pull Request](https://github.com/rails/rails/pull/13632)) + +* `blank?` and `present?` commit to return + singletons. ([Commit](https://github.com/rails/rails/commit/126dc47665c65cd129967cbd8a5926dddd0aa514)) + +* Default the new `I18n.enforce_available_locales` config to `true`, meaning + `I18n` will make sure that all locales passed to it must be declared in the + `available_locales` + list. ([Pull Request](https://github.com/rails/rails/commit/8e21ae37ad9fef6b7393a84f9b5f2e18a831e49a)) + +* Introduce Module#concerning: a natural, low-ceremony way to separate + responsibilities within a + class. ([Commit](https://github.com/rails/rails/commit/1eee0ca6de975b42524105a59e0521d18b38ab81)) + Credits ------- -- cgit v1.2.3 From 7f648bc70e76b7a386a41f882ddd97105334f590 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Thu, 6 Feb 2014 12:18:46 +0100 Subject: docs, Associations also raise on name conflicts. [ci skip] Follow up to https://github.com/rails/rails/commit/580f0b61dc99c6854fa930a761d28a3ab08163f7#commitcomment-5293470 --- guides/source/4_1_release_notes.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 170b071df8..90e6b2fcbc 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -525,8 +525,9 @@ for detailed changes. return an `Enumerator` that can calculate its size. ([Pull Request](https://github.com/rails/rails/pull/13938)) -* `scope` and `endum` now raise on "dangerous" name - conflicts. ([Pull Request](https://github.com/rails/rails/pull/13450)) +* `scope`, `enum` and Associations now raise on "dangerous" name + conflicts. ([Pull Request](https://github.com/rails/rails/pull/13450), + [Pull Request](https://github.com/rails/rails/pull/13896)) * `second` through `fifth` methods act like the `first` finder. ([Pull Request](https://github.com/rails/rails/pull/13757)) -- cgit v1.2.3 From 0b86a6e950ed78822470793deddbec41c6d105f5 Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Tue, 11 Feb 2014 02:13:09 -0800 Subject: Updated CHANGELOG, docs, guides and release notes. Also added a `cookies_serializer.rb` initializer to the app template. --- guides/source/4_1_release_notes.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'guides/source/4_1_release_notes.md') diff --git a/guides/source/4_1_release_notes.md b/guides/source/4_1_release_notes.md index 90e6b2fcbc..8fcfc71351 100644 --- a/guides/source/4_1_release_notes.md +++ b/guides/source/4_1_release_notes.md @@ -346,10 +346,8 @@ for detailed changes. params "deep munging" that was used to address security vulnerability CVE-2013-0155. ([Pull Request](https://github.com/rails/rails/pull/13188)) -* Added `:serializer` option for `config.session_store :cookie_store`. This - changes default serializer when using - `:cookie_store`. ([Pull Request](https://github.com/rails/rails/pull/13692)) - +* New config option `config.action_dispatch.cookies_serializer` for specifying + a serializer for the signed and encrypted cookie jars. (Pull Requests [1](https://github.com/rails/rails/pull/13692), [2](https://github.com/rails/rails/pull/13945) / [More Details](upgrading_ruby_on_rails.html#cookies-serializer)) Action Mailer ------------- -- cgit v1.2.3