2013-12-05 06:46:22 -05:00
|
|
|
* Ensure `config.i18n.enforce_available_locales` is set before any other
|
|
|
|
configuration option.
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2013-12-03 11:38:12 -05:00
|
|
|
* Added `Date#all_week/month/quarter/year` for generating date ranges.
|
2013-03-12 09:18:26 -04:00
|
|
|
|
|
|
|
*Dmitriy Meremyanin*
|
|
|
|
|
2013-11-09 09:23:15 -05:00
|
|
|
* Add `Time.zone.yesterday` and `Time.zone.tomorrow`. These follow the
|
|
|
|
behavior of Ruby's `Date.yesterday` and `Date.tomorrow` but return localized
|
|
|
|
versions, similar to how `Time.zone.today` has returned a localized version
|
|
|
|
of `Date.today`.
|
|
|
|
|
|
|
|
*Colin Bartlett*
|
|
|
|
|
Modify the Hash#assert_valid_keys error message so that it shows the valid keys. Also, show the wrong value as it was entered.
{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore
{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: failore
{ 'failore' => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: "failore". Valid keys are: :failure, :funny
{ :failore => "stuff", :funny => "business" }.assert_valid_keys([ :failure, :funny ])
=> ArgumentError: Unknown key: :failore. Valid keys are: :failure, :funny
Conflicts:
activerecord/CHANGELOG.md
Closes #11624.
2013-07-27 12:37:28 -04:00
|
|
|
* Show valid keys when `assert_valid_keys` raises an exception, and show the
|
|
|
|
wrong value as it was entered.
|
|
|
|
|
|
|
|
*Gonzalo Rodríguez-Baltanás Díaz*
|
|
|
|
|
2013-06-30 09:45:32 -04:00
|
|
|
* Both `cattr_*` and `mattr_*` method definitions now live in `active_support/core_ext/module/attribute_accessors`.
|
|
|
|
|
|
|
|
Requires to `active_support/core_ext/class/attribute_accessors` are
|
|
|
|
deprecated and will be removed in Ruby on Rails 4.2.
|
|
|
|
|
|
|
|
*Genadi Samokovarov*
|
|
|
|
|
2013-11-28 11:21:18 -05:00
|
|
|
* Deprecated `Numeric#{ago,until,since,from_now}`, the user is expected to explicitly
|
|
|
|
convert the value into an AS::Duration, i.e. `5.ago` => `5.seconds.ago`
|
Deprecated Numeric#{ago,until,since,from_now}
The user is expected to explicitly convert the value into an
AS::Duration, i.e. `5.ago` => `5.seconds.ago`
This will help to catch subtle bugs like:
def recent?(days = 3)
self.created_at >= days.ago
end
The above code would check if the model is created within the last 3
**seconds**.
In the future, `Numeric#{ago,until,since,from_now}` should be removed
completely, or throw some sort of errors to indicate there are no
implicit conversion from `Numeric` to `AS::Duration`.
Also fixed & refactor the test cases for Numeric#{ago,since} and
AS::Duration#{ago,since}. The original test case had the assertion
flipped and the purpose of the test wasn't very clear.
2013-09-27 15:51:36 -04:00
|
|
|
|
|
|
|
This will help to catch subtle bugs like:
|
|
|
|
|
2013-11-28 11:21:18 -05:00
|
|
|
def recent?(days = 3)
|
|
|
|
self.created_at >= days.ago
|
|
|
|
end
|
Deprecated Numeric#{ago,until,since,from_now}
The user is expected to explicitly convert the value into an
AS::Duration, i.e. `5.ago` => `5.seconds.ago`
This will help to catch subtle bugs like:
def recent?(days = 3)
self.created_at >= days.ago
end
The above code would check if the model is created within the last 3
**seconds**.
In the future, `Numeric#{ago,until,since,from_now}` should be removed
completely, or throw some sort of errors to indicate there are no
implicit conversion from `Numeric` to `AS::Duration`.
Also fixed & refactor the test cases for Numeric#{ago,since} and
AS::Duration#{ago,since}. The original test case had the assertion
flipped and the purpose of the test wasn't very clear.
2013-09-27 15:51:36 -04:00
|
|
|
|
|
|
|
The above code would check if the model is created within the last 3 **seconds**.
|
|
|
|
|
2013-11-28 11:21:18 -05:00
|
|
|
In the future, `Numeric#{ago,until,since,from_now}` should be removed completely,
|
Deprecated Numeric#{ago,until,since,from_now}
The user is expected to explicitly convert the value into an
AS::Duration, i.e. `5.ago` => `5.seconds.ago`
This will help to catch subtle bugs like:
def recent?(days = 3)
self.created_at >= days.ago
end
The above code would check if the model is created within the last 3
**seconds**.
In the future, `Numeric#{ago,until,since,from_now}` should be removed
completely, or throw some sort of errors to indicate there are no
implicit conversion from `Numeric` to `AS::Duration`.
Also fixed & refactor the test cases for Numeric#{ago,since} and
AS::Duration#{ago,since}. The original test case had the assertion
flipped and the purpose of the test wasn't very clear.
2013-09-27 15:51:36 -04:00
|
|
|
or throw some sort of errors to indicate there are no implicit conversion from
|
|
|
|
Numeric to AS::Duration.
|
|
|
|
|
|
|
|
*Godfrey Chan*
|
|
|
|
|
2013-11-27 01:17:50 -05:00
|
|
|
* Requires JSON gem version 1.7.7 or above due to a security issue in older versions.
|
|
|
|
|
|
|
|
*Godfrey Chan*
|
|
|
|
|
2013-11-26 17:05:12 -05:00
|
|
|
* Removed the old pure-Ruby JSON encoder and switched to a new encoder based on the built-in JSON
|
|
|
|
gem.
|
|
|
|
|
|
|
|
Support for encoding `BigDecimal` as a JSON number, as well as defining custom `encode_json`
|
|
|
|
methods to control the JSON output has been **removed from core**. The new encoder will always
|
|
|
|
encode BigDecimals as `String`s and ignore any custom `encode_json` methods.
|
|
|
|
|
|
|
|
The old encoder has been extracted into the `activesupport-json_encoder` gem. Installing that
|
|
|
|
gem will bring back the ability to encode `BigDecimal`s as numbers as well as `encode_json`
|
|
|
|
support.
|
|
|
|
|
|
|
|
Setting the related configuration `ActiveSupport.encode_big_decimal_as_string` without the
|
|
|
|
`activesupport-json_encoder` gem installed will raise an error.
|
|
|
|
|
|
|
|
*Godfrey Chan*
|
|
|
|
|
Add `#travel` and `#travel_to` to AS::TestCase
Add `ActiveSupport::Testing::TimeHelpers#travel` and `#travel_to`. These
methods change current time to the given time or time difference by
stubbing `Time.now` and `Date.today` to return the time or date after
the difference calculation, or the time or date that got passed into the
method respectively. These methods also accept a block, which will
return current time back to its original state at the end of the block.
Example for `#travel`:
Time.now # => 2013-11-09 15:34:49 -05:00
travel 1.day
Time.now # => 2013-11-10 15:34:49 -05:00
Date.today # => Sun, 10 Nov 2013
Example for `#travel_to`:
Time.now # => 2013-11-09 15:34:49 -05:00
travel_to Time.new(2004, 11, 24, 01, 04, 44)
Time.now # => 2004-11-24 01:04:44 -05:00
Date.today # => Wed, 24 Nov 2004
Both of these methods also accept a block, which will return the current
time back to its original state at the end of the block:
Time.now # => 2013-11-09 15:34:49 -05:00
travel 1.day do
User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00
end
travel_to Time.new(2004, 11, 24, 01, 04, 44) do
User.create.created_at # => Wed, 24 Nov 2004 01:04:44 EST -05:00
end
Time.now # => 2013-11-09 15:34:49 -05:00
This module is included in `ActiveSupport::TestCase` automatically.
2013-11-09 13:03:28 -05:00
|
|
|
* Add `ActiveSupport::Testing::TimeHelpers#travel` and `#travel_to`. These methods change current
|
|
|
|
time to the given time or time difference by stubbing `Time.now` and `Date.today` to return the
|
|
|
|
time or date after the difference calculation, or the time or date that got passed into the
|
2013-11-28 09:43:00 -05:00
|
|
|
method respectively.
|
Add `#travel` and `#travel_to` to AS::TestCase
Add `ActiveSupport::Testing::TimeHelpers#travel` and `#travel_to`. These
methods change current time to the given time or time difference by
stubbing `Time.now` and `Date.today` to return the time or date after
the difference calculation, or the time or date that got passed into the
method respectively. These methods also accept a block, which will
return current time back to its original state at the end of the block.
Example for `#travel`:
Time.now # => 2013-11-09 15:34:49 -05:00
travel 1.day
Time.now # => 2013-11-10 15:34:49 -05:00
Date.today # => Sun, 10 Nov 2013
Example for `#travel_to`:
Time.now # => 2013-11-09 15:34:49 -05:00
travel_to Time.new(2004, 11, 24, 01, 04, 44)
Time.now # => 2004-11-24 01:04:44 -05:00
Date.today # => Wed, 24 Nov 2004
Both of these methods also accept a block, which will return the current
time back to its original state at the end of the block:
Time.now # => 2013-11-09 15:34:49 -05:00
travel 1.day do
User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00
end
travel_to Time.new(2004, 11, 24, 01, 04, 44) do
User.create.created_at # => Wed, 24 Nov 2004 01:04:44 EST -05:00
end
Time.now # => 2013-11-09 15:34:49 -05:00
This module is included in `ActiveSupport::TestCase` automatically.
2013-11-09 13:03:28 -05:00
|
|
|
|
|
|
|
Example for `#travel`:
|
|
|
|
|
|
|
|
Time.now # => 2013-11-09 15:34:49 -05:00
|
|
|
|
travel 1.day
|
|
|
|
Time.now # => 2013-11-10 15:34:49 -05:00
|
|
|
|
Date.today # => Sun, 10 Nov 2013
|
|
|
|
|
|
|
|
Example for `#travel_to`:
|
|
|
|
|
|
|
|
Time.now # => 2013-11-09 15:34:49 -05:00
|
|
|
|
travel_to Time.new(2004, 11, 24, 01, 04, 44)
|
|
|
|
Time.now # => 2004-11-24 01:04:44 -05:00
|
|
|
|
Date.today # => Wed, 24 Nov 2004
|
|
|
|
|
|
|
|
Both of these methods also accept a block, which will return the current time back to its
|
|
|
|
original state at the end of the block:
|
|
|
|
|
|
|
|
Time.now # => 2013-11-09 15:34:49 -05:00
|
|
|
|
|
|
|
|
travel 1.day do
|
|
|
|
User.create.created_at # => Sun, 10 Nov 2013 15:34:49 EST -05:00
|
|
|
|
end
|
|
|
|
|
|
|
|
travel_to Time.new(2004, 11, 24, 01, 04, 44) do
|
|
|
|
User.create.created_at # => Wed, 24 Nov 2004 01:04:44 EST -05:00
|
|
|
|
end
|
|
|
|
|
|
|
|
Time.now # => 2013-11-09 15:34:49 -05:00
|
|
|
|
|
|
|
|
This module is included in `ActiveSupport::TestCase` automatically.
|
|
|
|
|
|
|
|
*Prem Sichanugrist*, *DHH*
|
|
|
|
|
2013-06-05 03:05:53 -04:00
|
|
|
* Unify `cattr_*` interface: allow to pass a block to `cattr_reader`.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
class A
|
|
|
|
cattr_reader(:defr) { 'default_reader_value' }
|
|
|
|
end
|
|
|
|
A.defr # => 'default_reader_value'
|
|
|
|
|
|
|
|
*Alexey Chernenkov*
|
|
|
|
|
2013-11-12 04:57:21 -05:00
|
|
|
* Improved compatibility with the stdlib JSON gem.
|
|
|
|
|
|
|
|
Previously, calling `::JSON.{generate,dump}` sometimes causes unexpected
|
|
|
|
failures such as intridea/multi_json#86.
|
|
|
|
|
|
|
|
`::JSON.{generate,dump}` now bypasses the ActiveSupport JSON encoder
|
|
|
|
completely and yields the same result with or without ActiveSupport. This
|
|
|
|
means that it will **not** call `as_json` and will ignore any options that
|
|
|
|
the JSON gem does not natively understand. To invoke ActiveSupport's JSON
|
|
|
|
encoder instead, use `obj.to_json(options)` or
|
|
|
|
`ActiveSupport::JSON.encode(obj, options)`.
|
|
|
|
|
|
|
|
*Godfrey Chan*
|
|
|
|
|
2013-11-09 13:44:32 -05:00
|
|
|
* Fix Active Support `Time#to_json` and `DateTime#to_json` to return 3 decimal
|
2013-11-07 10:35:49 -05:00
|
|
|
places worth of fractional seconds, similar to `TimeWithZone`.
|
|
|
|
|
|
|
|
*Ryan Glover*
|
|
|
|
|
2013-11-06 00:01:38 -05:00
|
|
|
* Removed circular reference protection in JSON encoder, deprecated
|
2013-11-09 13:44:32 -05:00
|
|
|
`ActiveSupport::JSON::Encoding::CircularReferenceError`.
|
2013-11-06 00:01:38 -05:00
|
|
|
|
|
|
|
*Godfrey Chan*, *Sergio Campamá*
|
|
|
|
|
2013-11-09 13:44:32 -05:00
|
|
|
* Add `capitalize` option to `Inflector.humanize`, so strings can be humanized without being capitalized:
|
2013-11-06 15:57:21 -05:00
|
|
|
|
|
|
|
'employee_salary'.humanize # => "Employee salary"
|
|
|
|
'employee_salary'.humanize(capitalize: false) # => "employee salary"
|
|
|
|
|
|
|
|
*claudiob*
|
|
|
|
|
2013-11-09 13:44:32 -05:00
|
|
|
* Fixed `Object#as_json` and `Struct#as_json` not working properly with options. They now take
|
|
|
|
the same options as `Hash#as_json`:
|
2013-11-05 22:22:03 -05:00
|
|
|
|
|
|
|
struct = Struct.new(:foo, :bar).new
|
|
|
|
struct.foo = "hello"
|
|
|
|
struct.bar = "world"
|
|
|
|
json = struct.as_json(only: [:foo]) # => {foo: "hello"}
|
|
|
|
|
|
|
|
*Sergio Campamá*, *Godfrey Chan*
|
|
|
|
|
2013-11-09 13:44:32 -05:00
|
|
|
* Added `Numeric#in_milliseconds`, like `1.hour.in_milliseconds`, so we can feed them to JavaScript functions like `getTime()`.
|
2013-11-02 18:40:16 -04:00
|
|
|
|
2013-11-06 00:09:01 -05:00
|
|
|
*DHH*
|
2013-11-02 18:40:16 -04:00
|
|
|
|
2013-11-09 13:44:32 -05:00
|
|
|
* Calling `ActiveSupport::JSON.decode` with unsupported options now raises an error.
|
2013-09-13 03:03:12 -04:00
|
|
|
|
|
|
|
*Godfrey Chan*
|
|
|
|
|
2013-11-09 13:44:32 -05:00
|
|
|
* Support `:unless_exist` in `FileStore`.
|
2013-08-06 22:43:28 -04:00
|
|
|
|
|
|
|
*Michael Grosser*
|
|
|
|
|
2013-10-24 03:17:35 -04:00
|
|
|
* Fix `slice!` deleting the default value of the hash.
|
|
|
|
|
|
|
|
*Antonio Santos*
|
|
|
|
|
2013-10-01 03:55:51 -04:00
|
|
|
* `require_dependency` accepts objects that respond to `to_path`, in
|
|
|
|
particular `Pathname` instances.
|
|
|
|
|
|
|
|
*Benjamin Fleischer*
|
|
|
|
|
2013-11-06 00:09:01 -05:00
|
|
|
* Disable the ability to iterate over Range of AS::TimeWithZone
|
2013-09-23 06:15:57 -04:00
|
|
|
due to significant performance issues.
|
|
|
|
|
|
|
|
*Bogdan Gusiev*
|
|
|
|
|
2013-09-19 05:03:58 -04:00
|
|
|
* Allow attaching event subscribers to ActiveSupport::Notifications namespaces
|
|
|
|
before they're defined. Essentially, this means instead of this:
|
|
|
|
|
|
|
|
class JokeSubscriber < ActiveSupport::Subscriber
|
|
|
|
def sql(event)
|
|
|
|
puts "A rabbi and a priest walk into a bar..."
|
|
|
|
end
|
|
|
|
|
|
|
|
# This call needs to happen *after* defining the methods.
|
|
|
|
attach_to "active_record"
|
|
|
|
end
|
|
|
|
|
|
|
|
You can do this:
|
|
|
|
|
2013-10-16 09:53:43 -04:00
|
|
|
class JokeSubscriber < ActiveSupport::Subscriber
|
|
|
|
# This is much easier to read!
|
|
|
|
attach_to "active_record"
|
2013-09-19 05:03:58 -04:00
|
|
|
|
2013-10-16 09:53:43 -04:00
|
|
|
def sql(event)
|
|
|
|
puts "A rabbi and a priest walk into a bar..."
|
|
|
|
end
|
2013-09-19 05:03:58 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
This should make it easier to read and understand these subscribers.
|
|
|
|
|
|
|
|
*Daniel Schierbeck*
|
|
|
|
|
2013-09-12 17:34:34 -04:00
|
|
|
* Add `Date#middle_of_day`, `DateTime#middle_of_day` and `Time#middle_of_day` methods.
|
|
|
|
|
|
|
|
Also added `midday`, `noon`, `at_midday`, `at_noon` and `at_middle_of_day` as aliases.
|
|
|
|
|
|
|
|
*Anatoli Makarevich*
|
|
|
|
|
2013-09-11 08:24:50 -04:00
|
|
|
* Fix ActiveSupport::Cache::FileStore#cleanup to no longer rely on missing each_key method.
|
|
|
|
|
|
|
|
*Murray Steele*
|
|
|
|
|
2013-07-26 12:37:00 -04:00
|
|
|
* Ensure that autoloaded constants in all-caps nestings are marked as
|
|
|
|
autoloaded.
|
|
|
|
|
|
|
|
*Simon Coffey*
|
|
|
|
|
2013-11-28 11:21:18 -05:00
|
|
|
* Add `String#remove(pattern)` as a short-hand for the common pattern of
|
|
|
|
`String#gsub(pattern, '')`.
|
2013-08-13 13:15:48 -04:00
|
|
|
|
|
|
|
*DHH*
|
|
|
|
|
2013-08-12 19:38:48 -04:00
|
|
|
* Adds a new deprecation behaviour that raises an exception. Throwing this
|
2013-08-12 19:23:21 -04:00
|
|
|
line into +config/environments/development.rb+
|
|
|
|
|
2013-08-12 19:38:48 -04:00
|
|
|
ActiveSupport::Deprecation.behavior = :raise
|
2013-08-12 19:23:21 -04:00
|
|
|
|
|
|
|
will cause the application to raise an +ActiveSupport::DeprecationException+
|
|
|
|
on deprecations.
|
|
|
|
|
2013-08-12 19:28:28 -04:00
|
|
|
Use this for aggressive deprecation cleanups.
|
2013-08-12 19:23:21 -04:00
|
|
|
|
|
|
|
*Xavier Noria*
|
|
|
|
|
2013-07-30 07:00:40 -04:00
|
|
|
* Remove 'cow' => 'kine' irregular inflection from default inflections.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2013-07-29 07:28:19 -04:00
|
|
|
* Add `DateTime#to_s(:iso8601)` and `Date#to_s(:iso8601)` for consistency.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
|
|
|
* Add `Time#to_s(:iso8601)` for easy conversion of times to the iso8601 format for easy Javascript date parsing.
|
2013-07-28 17:34:43 -04:00
|
|
|
|
|
|
|
*DHH*
|
|
|
|
|
2013-07-22 11:51:36 -04:00
|
|
|
* Improve `ActiveSupport::Cache::MemoryStore` cache size calculation.
|
|
|
|
The memory used by a key/entry pair is calculated via `#cached_size`:
|
|
|
|
|
|
|
|
def cached_size(key, entry)
|
|
|
|
key.to_s.bytesize + entry.size + PER_ENTRY_OVERHEAD
|
|
|
|
end
|
|
|
|
|
|
|
|
The value of `PER_ENTRY_OVERHEAD` is 240 bytes based on an [empirical
|
|
|
|
estimation](https://gist.github.com/ssimeonov/6047200) for 64-bit MRI on
|
|
|
|
1.9.3 and 2.0. GH#11512
|
|
|
|
|
|
|
|
*Simeon Simeonov*
|
|
|
|
|
2013-07-11 03:56:47 -04:00
|
|
|
* Only raise `Module::DelegationError` if it's the source of the exception.
|
|
|
|
|
|
|
|
Fixes #10559
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2013-07-09 10:50:14 -04:00
|
|
|
* Make `Time.at_with_coercion` retain the second fraction and return local time.
|
2013-07-09 08:34:24 -04:00
|
|
|
|
|
|
|
Fixes #11350
|
|
|
|
|
|
|
|
*Neer Friedman*, *Andrew White*
|
|
|
|
|
2013-07-06 05:59:30 -04:00
|
|
|
* Make `HashWithIndifferentAccess#select` always return the hash, even when
|
|
|
|
`Hash#select!` returns `nil`, to allow further chaining.
|
|
|
|
|
|
|
|
*Marc Schütz*
|
|
|
|
|
2013-07-03 13:46:01 -04:00
|
|
|
* Remove deprecated `String#encoding_aware?` core extensions (`core_ext/string/encoding`).
|
|
|
|
|
|
|
|
*Arun Agrawal*
|
|
|
|
|
2013-07-03 13:42:34 -04:00
|
|
|
* Remove deprecated `Module#local_constant_names` in favor of `Module#local_constants`.
|
|
|
|
|
|
|
|
*Arun Agrawal*
|
|
|
|
|
2013-07-03 13:40:24 -04:00
|
|
|
* Remove deprecated `DateTime.local_offset` in favor of `DateTime.civil_from_fromat`.
|
|
|
|
|
|
|
|
*Arun Agrawal*
|
|
|
|
|
2013-07-02 22:37:31 -04:00
|
|
|
* Remove deprecated `Logger` core extensions (`core_ext/logger.rb`).
|
|
|
|
|
|
|
|
*Carlos Antonio da Silva*
|
|
|
|
|
2013-07-03 01:08:37 -04:00
|
|
|
* Remove deprecated `Time#time_with_datetime_fallback`, `Time#utc_time`
|
|
|
|
and `Time#local_time` in favor of `Time#utc` and `Time#local`.
|
|
|
|
|
|
|
|
*Vipul A M*
|
|
|
|
|
2013-07-02 22:28:56 -04:00
|
|
|
* Remove deprecated `Hash#diff` with no replacement.
|
|
|
|
|
|
|
|
If you're using it to compare hashes for the purpose of testing, please use
|
|
|
|
MiniTest's `assert_equal` instead.
|
|
|
|
|
|
|
|
*Carlos Antonio da Silva*
|
|
|
|
|
2013-07-03 05:52:52 -04:00
|
|
|
* Remove deprecated `Date#to_time_in_current_zone` in favor of `Date#in_time_zone`.
|
2013-07-01 23:48:08 -04:00
|
|
|
|
|
|
|
*Vipul A M*
|
|
|
|
|
2013-07-01 21:38:28 -04:00
|
|
|
* Remove deprecated `Proc#bind` with no replacement.
|
|
|
|
|
|
|
|
*Carlos Antonio da Silva*
|
|
|
|
|
2013-07-01 21:33:42 -04:00
|
|
|
* Remove deprecated `Array#uniq_by` and `Array#uniq_by!`, use native
|
|
|
|
`Array#uniq` and `Array#uniq!` instead.
|
|
|
|
|
|
|
|
*Carlos Antonio da Silva*
|
|
|
|
|
2013-07-01 21:26:54 -04:00
|
|
|
* Remove deprecated `ActiveSupport::BasicObject`, use `ActiveSupport::ProxyObject` instead.
|
|
|
|
|
|
|
|
*Carlos Antonio da Silva*
|
|
|
|
|
2013-11-28 11:21:18 -05:00
|
|
|
* Remove deprecated `BufferedLogger`, use `ActiveSupport::Logger` instead.
|
2013-07-01 16:15:33 -04:00
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2013-11-28 11:21:18 -05:00
|
|
|
* Remove deprecated `assert_present` and `assert_blank` methods, use `assert
|
|
|
|
object.blank?` and `assert object.present?` instead.
|
2013-07-01 16:06:26 -04:00
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2013-06-20 08:51:01 -04:00
|
|
|
* Fix return value from `BacktraceCleaner#noise` when the cleaner is configured
|
|
|
|
with multiple silencers.
|
|
|
|
|
|
|
|
Fixes #11030
|
|
|
|
|
|
|
|
*Mark J. Titorenko*
|
|
|
|
|
2013-06-14 18:53:58 -04:00
|
|
|
* `HashWithIndifferentAccess#select` now returns a `HashWithIndifferentAccess`
|
2013-06-14 16:56:49 -04:00
|
|
|
instance instead of a `Hash` instance.
|
|
|
|
|
|
|
|
Fixes #10723
|
|
|
|
|
|
|
|
*Albert Llop*
|
|
|
|
|
2013-06-13 07:01:12 -04:00
|
|
|
* Add `DateTime#usec` and `DateTime#nsec` so that `ActiveSupport::TimeWithZone` keeps
|
|
|
|
sub-second resolution when wrapping a `DateTime` value.
|
2013-06-14 16:56:49 -04:00
|
|
|
|
2013-06-13 07:01:12 -04:00
|
|
|
Fixes #10855
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2013-03-03 08:50:59 -05:00
|
|
|
* Fix `ActiveSupport::Dependencies::Loadable#load_dependency` calling
|
|
|
|
`#blame_file!` on Exceptions that do not have the Blamable mixin
|
|
|
|
|
|
|
|
*Andrew Kreiling*
|
|
|
|
|
2013-06-08 03:22:29 -04:00
|
|
|
* Override `Time.at` to support the passing of Time-like values when called with a single argument.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2013-05-29 02:43:35 -04:00
|
|
|
* Prevent side effects to hashes inside arrays when
|
|
|
|
`Hash#with_indifferent_access` is called.
|
2013-06-14 16:56:49 -04:00
|
|
|
|
2013-05-29 02:43:35 -04:00
|
|
|
Fixes #10526
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2013-11-30 04:13:18 -05:00
|
|
|
* Removed deprecated `ActiveSupport::JSON::Variable` with no replacement.
|
|
|
|
|
|
|
|
*Toshinori Kajihara*
|
|
|
|
|
2013-05-16 14:11:27 -04:00
|
|
|
* Raise an error when multiple `included` blocks are defined for a Concern.
|
|
|
|
The old behavior would silently discard previously defined blocks, running
|
|
|
|
only the last one.
|
|
|
|
|
|
|
|
*Mike Dillon*
|
|
|
|
|
2013-05-12 14:04:05 -04:00
|
|
|
* Replace `multi_json` with `json`.
|
|
|
|
|
2013-05-12 14:16:32 -04:00
|
|
|
Since Rails requires Ruby 1.9 and since Ruby 1.9 includes `json` in the standard library,
|
2013-05-12 14:04:05 -04:00
|
|
|
`multi_json` is no longer necessary.
|
|
|
|
|
|
|
|
*Erik Michaels-Ober*
|
|
|
|
|
2013-05-09 08:41:56 -04:00
|
|
|
* Added escaping of U+2028 and U+2029 inside the json encoder.
|
|
|
|
These characters are legal in JSON but break the Javascript interpreter.
|
|
|
|
After escaping them, the JSON is still legal and can be parsed by Javascript.
|
|
|
|
|
2013-05-10 13:39:29 -04:00
|
|
|
*Mario Caropreso + Viktor Kelemen + zackham*
|
2013-05-09 08:41:56 -04:00
|
|
|
|
2013-05-07 15:11:52 -04:00
|
|
|
* Fix skipping object callbacks using metadata fetched via callback chain
|
|
|
|
inspection methods (`_*_callbacks`)
|
|
|
|
|
|
|
|
*Sean Walbran*
|
|
|
|
|
2013-04-15 10:41:27 -04:00
|
|
|
* Add a `fetch_multi` method to the cache stores. The method provides
|
|
|
|
an easy to use API for fetching multiple values from the cache.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
# Calculating scores is expensive, so we only do it for posts
|
|
|
|
# that have been updated. Cache keys are automatically extracted
|
|
|
|
# from objects that define a #cache_key method.
|
|
|
|
scores = Rails.cache.fetch_multi(*posts) do |post|
|
|
|
|
calculate_score(post)
|
|
|
|
end
|
|
|
|
|
|
|
|
*Daniel Schierbeck*
|
2013-02-26 11:45:20 -05:00
|
|
|
|
2013-04-29 12:06:45 -04:00
|
|
|
Please check [4-0-stable](https://github.com/rails/rails/blob/4-0-stable/activesupport/CHANGELOG.md) for previous changes.
|