2013-02-26 11:45:20 -05:00
|
|
|
## Rails 4.0.0 (unreleased) ##
|
|
|
|
|
2013-02-26 14:21:37 -05:00
|
|
|
* Fix deletion of empty directories in ActiveSupport::Cache::FileStore.
|
|
|
|
|
|
|
|
*Charles Jones*
|
2013-02-26 11:45:20 -05:00
|
|
|
|
2013-02-25 09:31:50 -05:00
|
|
|
## Rails 4.0.0.beta1 (February 25, 2013) ##
|
2012-12-19 20:08:34 -05:00
|
|
|
|
2013-02-23 09:51:57 -05:00
|
|
|
* Prevent `DateTime#change` from truncating the second fraction, when seconds
|
|
|
|
do not need to be changed.
|
|
|
|
|
|
|
|
*Chris Baynes*
|
|
|
|
|
2013-02-24 16:07:20 -05:00
|
|
|
* Added `ActiveSupport::TimeWithZone#to_r` for `Time#at` compatibility.
|
|
|
|
|
2013-02-24 16:36:45 -05:00
|
|
|
Before this change:
|
|
|
|
|
|
|
|
Time.zone = 'Tokyo'
|
|
|
|
time = Time.zone.now
|
|
|
|
time == Time.at(time) # => false
|
|
|
|
|
|
|
|
After the change:
|
|
|
|
|
|
|
|
Time.zone = 'Tokyo'
|
|
|
|
time = Time.zone.now
|
|
|
|
time == Time.at(time) # => true
|
|
|
|
|
2013-02-24 16:07:20 -05:00
|
|
|
*stopdropandrew*
|
|
|
|
|
2013-02-20 16:15:59 -05:00
|
|
|
* `ActiveSupport::NumberHelper#number_to_human` returns the number unaltered when
|
2013-02-22 17:44:37 -05:00
|
|
|
the given units hash does not contain the needed key, e.g. when the number provided
|
|
|
|
is less than the largest key provided.
|
|
|
|
Fixes #9269.
|
2013-02-20 16:15:59 -05:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
2013-02-22 17:44:37 -05:00
|
|
|
number_to_human(123, units: {}) # => 123
|
|
|
|
number_to_human(123, units: { thousand: 'k' }) # => 123
|
2013-02-20 16:15:59 -05:00
|
|
|
|
|
|
|
*Michael Hoffman*
|
|
|
|
|
2013-02-22 17:44:37 -05:00
|
|
|
* Added `beginning_of_minute` support to core ext calculations for `Time` and `DateTime`.
|
2013-02-21 15:22:50 -05:00
|
|
|
|
|
|
|
*Gagan Awhad*
|
|
|
|
|
2013-02-20 12:06:50 -05:00
|
|
|
* Add `:nsec` date format.
|
|
|
|
|
|
|
|
*Jamie Gaskins*
|
|
|
|
|
2013-02-22 17:44:37 -05:00
|
|
|
* `ActiveSupport::Gzip.compress` allows two optional arguments for compression
|
2012-09-22 05:07:50 -04:00
|
|
|
level and strategy.
|
|
|
|
|
|
|
|
*Beyond*
|
|
|
|
|
2013-01-30 19:59:09 -05:00
|
|
|
* Modify `TimeWithZone#as_json` to include 3 decimal places of sub-second accuracy
|
|
|
|
by default, which is optional as per the ISO8601 spec, but extremely useful. Also
|
2013-02-24 15:25:51 -05:00
|
|
|
the default behaviour of `Date#toJSON()` in recent versions of Chrome, Safari and
|
2013-01-30 19:59:09 -05:00
|
|
|
Firefox.
|
|
|
|
|
2013-02-06 15:59:15 -05:00
|
|
|
*James Harton*
|
|
|
|
|
2013-01-28 16:39:17 -05:00
|
|
|
* Improve `String#squish` to handle Unicode whitespace. *Antoine Lyset*
|
|
|
|
|
2013-01-21 07:19:10 -05:00
|
|
|
* Standardise on `to_time` returning an instance of `Time` in the local system timezone
|
|
|
|
across `String`, `Time`, `Date`, `DateTime` and `ActiveSupport::TimeWithZone`.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2013-01-05 18:05:25 -05:00
|
|
|
* Extract `ActiveSupport::Testing::Performance` into https://github.com/rails/rails-perftest
|
2013-02-24 15:25:51 -05:00
|
|
|
You can add the gem to your `Gemfile` to keep using performance tests.
|
2013-01-05 18:05:25 -05:00
|
|
|
|
|
|
|
gem 'rails-perftest'
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2013-02-06 15:59:15 -05:00
|
|
|
* `Hash.from_xml` raises when it encounters `type="symbol"` or `type="yaml"`.
|
|
|
|
Use `Hash.from_trusted_xml` to parse this XML.
|
2013-01-05 19:46:26 -05:00
|
|
|
|
|
|
|
CVE-2013-0156
|
|
|
|
|
|
|
|
*Jeremy Kemper*
|
|
|
|
|
2013-01-05 11:59:36 -05:00
|
|
|
* Deprecate `assert_present` and `assert_blank` in favor of
|
|
|
|
`assert object.blank?` and `assert object.present?`
|
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2013-01-04 19:36:49 -05:00
|
|
|
* Change `String#to_date` to use `Date.parse`. This gives more consistent error
|
2013-01-02 18:50:55 -05:00
|
|
|
messages and allows the use of partial dates.
|
|
|
|
|
|
|
|
"gibberish".to_date => Argument Error: invalid date
|
|
|
|
"3rd Feb".to_date => Sun, 03 Feb 2013
|
|
|
|
|
|
|
|
*Kelly Stannard*
|
|
|
|
|
2013-01-04 19:36:49 -05:00
|
|
|
* It's now possible to compare `Date`, `DateTime`, `Time` and `TimeWithZone`
|
2013-02-24 15:25:51 -05:00
|
|
|
with `Float::INFINITY`. This allows to create date/time ranges with one infinite bound.
|
2012-08-14 14:28:26 -04:00
|
|
|
Example:
|
|
|
|
|
|
|
|
range = Range.new(Date.today, Float::INFINITY)
|
|
|
|
|
|
|
|
Also it's possible to check inclusion of date/time in range with conversion.
|
|
|
|
|
|
|
|
range.include?(Time.now + 1.year) # => true
|
|
|
|
range.include?(DateTime.now + 1.year) # => true
|
|
|
|
|
|
|
|
*Alexander Grebennik*
|
|
|
|
|
2013-01-02 16:43:26 -05:00
|
|
|
* Remove meaningless `ActiveSupport::FrozenObjectError`, which was just an alias of `RuntimeError`.
|
|
|
|
|
|
|
|
*Akira Matsuda*
|
|
|
|
|
2013-01-02 18:11:11 -05:00
|
|
|
* Introduce `assert_not` to replace warty `assert !foo`. *Jeremy Kemper*
|
2012-12-28 12:34:26 -05:00
|
|
|
|
2012-08-15 08:43:04 -04:00
|
|
|
* Prevent `Callbacks#set_callback` from setting the same callback twice.
|
|
|
|
|
|
|
|
before_save :foo, :bar, :foo
|
|
|
|
|
|
|
|
will at first call `bar`, then `foo`. `foo` will no more be called
|
|
|
|
twice.
|
|
|
|
|
|
|
|
*Dmitriy Kiriyenko*
|
|
|
|
|
2013-01-02 18:11:11 -05:00
|
|
|
* Add `ActiveSupport::Logger#silence` that works the same as the old `Logger#silence` extension.
|
2012-12-21 13:15:36 -05:00
|
|
|
|
|
|
|
*DHH*
|
|
|
|
|
2012-12-19 20:08:34 -05:00
|
|
|
* Remove surrogate unicode character encoding from `ActiveSupport::JSON.encode`
|
2012-12-13 18:52:19 -05:00
|
|
|
The encoding scheme was broken for unicode characters outside the basic multilingual plane;
|
2013-02-24 15:25:51 -05:00
|
|
|
since json is assumed to be UTF-8, and we already force the encoding to UTF-8,
|
2012-12-19 20:08:34 -05:00
|
|
|
simply pass through the un-encoded characters.
|
2012-12-13 18:52:19 -05:00
|
|
|
|
|
|
|
*Brett Carter*
|
2012-11-09 09:24:05 -05:00
|
|
|
|
2012-12-11 08:57:05 -05:00
|
|
|
* Deprecate `Time.time_with_date_fallback`, `Time.utc_time` and `Time.local_time`.
|
2013-02-24 15:25:51 -05:00
|
|
|
These methods were added to handle the limited range of Ruby's native `Time`
|
2012-12-11 08:57:05 -05:00
|
|
|
implementation. Those limitations no longer apply so we are deprecating them in 4.0
|
|
|
|
and they will be removed in 4.1.
|
|
|
|
|
|
|
|
*Andrew White*
|
|
|
|
|
2012-12-11 02:06:34 -05:00
|
|
|
* Deprecate `Date#to_time_in_current_zone` and add `Date#in_time_zone`. *Andrew White*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Add `String#in_time_zone` method to convert a string to an `ActiveSupport::TimeWithZone`. *Andrew White*
|
2012-12-11 01:32:28 -05:00
|
|
|
|
2012-12-07 14:13:56 -05:00
|
|
|
* Deprecate `ActiveSupport::BasicObject` in favor of `ActiveSupport::ProxyObject`.
|
2013-02-24 15:25:51 -05:00
|
|
|
This class is used for proxy classes. It avoids confusion with Ruby's `BasicObject`
|
2012-12-07 14:13:56 -05:00
|
|
|
class.
|
|
|
|
|
|
|
|
*Francesco Rodriguez*
|
|
|
|
|
2013-02-22 17:44:37 -05:00
|
|
|
* Patched `Marshal#load` to work with constant autoloading. Fixes autoloading
|
|
|
|
with cache stores that rely on `Marshal` (`MemCacheStore` and `FileStore`).
|
|
|
|
Fixes #8167.
|
2012-11-16 19:05:53 -05:00
|
|
|
|
|
|
|
*Uriel Katz*
|
|
|
|
|
2012-12-01 06:15:29 -05:00
|
|
|
* Make `Time.zone.parse` to work with JavaScript format date strings. *Andrew White*
|
|
|
|
|
2012-10-16 06:05:24 -04:00
|
|
|
* Add `DateTime#seconds_until_end_of_day` and `Time#seconds_until_end_of_day`
|
|
|
|
as a complement for `seconds_from_midnight`; useful when setting expiration
|
|
|
|
times for caches, e.g.:
|
|
|
|
|
|
|
|
<% cache('dashboard', expires_in: Date.current.seconds_until_end_of_day) do %>
|
|
|
|
...
|
|
|
|
|
|
|
|
*Olek Janiszewski*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* No longer proxy `ActiveSupport::Multibyte#class`. *Steve Klabnik*
|
2012-11-28 16:57:07 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Deprecate `ActiveSupport::TestCase#pending` method, use `skip` from minitest instead. *Carlos Antonio da Silva*
|
2012-11-17 11:24:33 -05:00
|
|
|
|
2012-11-14 00:58:33 -05:00
|
|
|
* `XmlMini.with_backend` now may be safely used with threads:
|
|
|
|
|
|
|
|
Thread.new do
|
|
|
|
XmlMini.with_backend("REXML") { rexml_power }
|
|
|
|
end
|
|
|
|
Thread.new do
|
|
|
|
XmlMini.with_backend("LibXML") { libxml_power }
|
|
|
|
end
|
|
|
|
|
|
|
|
Each thread will use it's own backend.
|
|
|
|
|
|
|
|
*Nikita Afanasenko*
|
|
|
|
|
2013-02-22 17:44:37 -05:00
|
|
|
* Dependencies no longer trigger `Kernel#autoload` in `remove_constant`. Fixes #8213. *Xavier Noria*
|
2012-11-14 22:33:17 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Simplify `mocha` integration and remove monkey-patches, bumping `mocha` to 0.13.0. *James Mead*
|
2012-11-13 05:49:18 -05:00
|
|
|
|
2013-02-22 17:44:37 -05:00
|
|
|
* `#as_json` isolates options when encoding a hash. Fixes #8182.
|
2012-11-12 08:33:20 -05:00
|
|
|
|
|
|
|
*Yves Senn*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Deprecate `Hash#diff` in favor of minitest's #diff. *Steve Klabnik*
|
2012-11-09 09:24:05 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `Kernel#capture` can catch output from subprocesses. *Dmitry Vorotilin*
|
2011-12-19 21:41:37 -05:00
|
|
|
|
2012-11-03 07:25:27 -04:00
|
|
|
* `to_xml` conversions now use builder's `tag!` method instead of explicit invocation of `method_missing`.
|
|
|
|
|
|
|
|
*Nikita Afanasenko*
|
|
|
|
|
2012-11-01 20:58:17 -04:00
|
|
|
* Fixed timezone mapping of the Solomon Islands. *Steve Klabnik*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Make callstack attribute optional in `ActiveSupport::Deprecation::Reporting`
|
|
|
|
methods `warn` and `deprecation_warning`.
|
2012-10-29 22:23:41 -04:00
|
|
|
|
|
|
|
*Alexey Gaziev*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Implement `HashWithIndifferentAccess#replace` so `key?` works correctly. *David Graham*
|
2012-10-16 15:05:25 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Handle the possible permission denied errors `atomic.rb` might trigger due to its `chown`
|
|
|
|
and `chmod` calls.
|
2012-10-25 04:06:40 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
*Daniele Sluijters*
|
|
|
|
|
|
|
|
* `Hash#extract!` returns only those keys that present in the receiver.
|
2012-07-08 17:10:16 -04:00
|
|
|
|
2012-12-14 17:16:59 -05:00
|
|
|
{a: 1, b: 2}.extract!(:a, :x) # => {:a => 1}
|
2012-07-08 17:10:16 -04:00
|
|
|
|
|
|
|
*Mikhail Dieterle*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `Hash#extract!` returns the same subclass, that the receiver is. I.e.
|
|
|
|
`HashWithIndifferentAccess#extract!` returns a `HashWithIndifferentAccess` instance.
|
2012-07-08 17:10:16 -04:00
|
|
|
|
|
|
|
*Mikhail Dieterle*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Optimize `ActiveSupport::Cache::Entry` to reduce memory and processing overhead. *Brian Durand*
|
2012-10-01 22:17:13 -04:00
|
|
|
|
2012-09-26 14:16:43 -04:00
|
|
|
* Tests tag the Rails log with the current test class and test case:
|
|
|
|
|
|
|
|
[SessionsControllerTest] [test_0002_sign in] Processing by SessionsController#create as HTML
|
|
|
|
[SessionsControllerTest] [test_0002_sign in] ...
|
|
|
|
|
|
|
|
*Jeremy Kemper*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Add `logger.push_tags` and `.pop_tags` to complement `logger.tagged`:
|
2012-09-26 13:08:20 -04:00
|
|
|
|
|
|
|
class Job
|
|
|
|
def before
|
|
|
|
Rails.logger.push_tags :jobs, self.class.name
|
|
|
|
end
|
|
|
|
|
|
|
|
def after
|
|
|
|
Rails.logger.pop_tags 2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
*Jeremy Kemper*
|
|
|
|
|
2012-09-20 17:47:57 -04:00
|
|
|
* Allow delegation to the class using the `:class` keyword, replacing
|
|
|
|
`self.class` usage:
|
|
|
|
|
|
|
|
class User
|
|
|
|
def self.hello
|
|
|
|
"world"
|
|
|
|
end
|
|
|
|
|
|
|
|
delegate :hello, to: :class
|
|
|
|
end
|
|
|
|
|
|
|
|
*Marc-Andre Lafortune*
|
|
|
|
|
|
|
|
* `Date.beginning_of_week` thread local and `beginning_of_week` application
|
|
|
|
config option added (default is Monday).
|
|
|
|
|
|
|
|
*Innokenty Mikhailov*
|
2012-09-18 10:18:19 -04:00
|
|
|
|
2012-09-14 15:25:21 -04:00
|
|
|
* An optional block can be passed to `config_accessor` to set its default value
|
|
|
|
|
|
|
|
class User
|
|
|
|
include ActiveSupport::Configurable
|
2013-02-24 15:25:51 -05:00
|
|
|
|
2012-09-14 15:25:21 -04:00
|
|
|
config_accessor :hair_colors do
|
|
|
|
[:brown, :black, :blonde, :red]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
User.hair_colors # => [:brown, :black, :blonde, :red]
|
|
|
|
|
|
|
|
*Larry Lv*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `ActiveSupport::Benchmarkable#silence` has been deprecated due to its lack of
|
2012-09-20 17:47:57 -04:00
|
|
|
thread safety. It will be removed without replacement in Rails 4.1.
|
|
|
|
|
|
|
|
*Steve Klabnik*
|
|
|
|
|
|
|
|
* An optional block can be passed to `Hash#deep_merge`. The block will be invoked
|
|
|
|
for each duplicated key and used to resolve the conflict.
|
2012-09-14 10:52:15 -04:00
|
|
|
|
2012-09-20 17:47:57 -04:00
|
|
|
*Pranas Kiziela*
|
2012-09-13 14:49:49 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `ActiveSupport::Deprecation` is now a class. It is possible to create an instance
|
2012-09-13 02:38:34 -04:00
|
|
|
of deprecator. Backwards compatibility has been preserved.
|
|
|
|
|
|
|
|
You can choose which instance of the deprecator will be used.
|
|
|
|
|
2012-12-14 17:16:59 -05:00
|
|
|
deprecate :method_name, deprecator: deprecator_instance
|
2012-09-13 02:38:34 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
You can use `ActiveSupport::Deprecation` in your gem.
|
2012-09-13 02:38:34 -04:00
|
|
|
|
2012-09-13 13:02:18 -04:00
|
|
|
require 'active_support/deprecation'
|
|
|
|
require 'active_support/core_ext/module/deprecation'
|
2012-09-13 02:38:34 -04:00
|
|
|
|
2012-09-13 13:02:18 -04:00
|
|
|
class MyGem
|
|
|
|
def self.deprecator
|
|
|
|
ActiveSupport::Deprecation.new('2.0', 'MyGem')
|
|
|
|
end
|
2012-09-13 02:38:34 -04:00
|
|
|
|
2012-09-13 13:02:18 -04:00
|
|
|
def old_method
|
|
|
|
end
|
2012-09-13 02:38:34 -04:00
|
|
|
|
2012-09-13 13:02:18 -04:00
|
|
|
def new_method
|
|
|
|
end
|
2012-09-13 02:38:34 -04:00
|
|
|
|
2012-12-14 17:16:59 -05:00
|
|
|
deprecate old_method: :new_method, deprecator: deprecator
|
2012-09-13 13:02:18 -04:00
|
|
|
end
|
2012-09-13 02:38:34 -04:00
|
|
|
|
2012-09-13 13:02:18 -04:00
|
|
|
MyGem.new.old_method
|
|
|
|
# => DEPRECATION WARNING: old_method is deprecated and will be removed from MyGem 2.0 (use new_method instead). (called from <main> at file.rb:18)
|
2012-09-13 02:38:34 -04:00
|
|
|
|
|
|
|
*Piotr Niełacny & Robert Pankowecki*
|
|
|
|
|
2012-09-03 05:42:24 -04:00
|
|
|
* `ERB::Util.html_escape` encodes single quote as `#39`. Decimal form has better support in old browsers. *Kalys Osmonov*
|
|
|
|
|
2012-09-07 10:03:07 -04:00
|
|
|
* `ActiveSupport::Callbacks`: deprecate monkey patch of object callbacks.
|
2013-02-24 15:25:51 -05:00
|
|
|
Using the `filter` method like this:
|
2012-09-07 10:03:07 -04:00
|
|
|
|
|
|
|
before_filter MyFilter.new
|
|
|
|
|
|
|
|
class MyFilter
|
|
|
|
def filter(controller)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Is now deprecated with recommendation to use the corresponding filter type
|
|
|
|
(`#before`, `#after` or `#around`):
|
|
|
|
|
|
|
|
before_filter MyFilter.new
|
|
|
|
|
|
|
|
class MyFilter
|
|
|
|
def before(controller)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
*Bogdan Gusiev*
|
|
|
|
|
2012-09-03 18:13:49 -04:00
|
|
|
* An optional block can be passed to `HashWithIndifferentAccess#update` and `#merge`.
|
|
|
|
The block will be invoked for each duplicated key, and used to resolve the conflict,
|
|
|
|
thus replicating the behaviour of the corresponding methods on the `Hash` class.
|
|
|
|
|
|
|
|
*Leo Cassarani*
|
|
|
|
|
2012-08-21 17:39:37 -04:00
|
|
|
* Remove `j` alias for `ERB::Util#json_escape`.
|
|
|
|
The `j` alias is already used for `ActionView::Helpers::JavaScriptHelper#escape_javascript`
|
|
|
|
and both modules are included in the view context that would confuse the developers.
|
|
|
|
|
|
|
|
*Akira Matsuda*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Replace deprecated `memcache-client` gem with `dalli` in `ActiveSupport::Cache::MemCacheStore`.
|
2012-06-28 22:47:46 -04:00
|
|
|
|
|
|
|
*Guillermo Iguaran*
|
|
|
|
|
2012-06-23 19:05:42 -04:00
|
|
|
* Add default values to all `ActiveSupport::NumberHelper` methods, to avoid
|
|
|
|
errors with empty locales or missing values.
|
|
|
|
|
|
|
|
*Carlos Antonio da Silva*
|
|
|
|
|
2012-09-07 10:11:00 -04:00
|
|
|
* `ActiveSupport::JSON::Variable` is deprecated. Define your own `#as_json` and
|
|
|
|
`#encode_json` methods for custom JSON string literals.
|
2012-08-10 23:10:11 -04:00
|
|
|
|
|
|
|
*Erich Menge*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Add `String#indent`. *fxn & Ace Suares*
|
2012-08-10 23:10:11 -04:00
|
|
|
|
|
|
|
* Inflections can now be defined per locale. `singularize` and `pluralize`
|
|
|
|
accept locale as an extra argument.
|
|
|
|
|
|
|
|
*David Celis*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `Object#try` will now return `nil` instead of raise a `NoMethodError` if the
|
2012-08-10 23:10:11 -04:00
|
|
|
receiving object does not implement the method, but you can still get the
|
|
|
|
old behavior by using the new `Object#try!`.
|
|
|
|
|
|
|
|
*DHH*
|
|
|
|
|
2012-08-09 19:54:52 -04:00
|
|
|
* `ERB::Util.html_escape` now escapes single quotes. *Santiago Pastorino*
|
2012-07-27 13:20:50 -04:00
|
|
|
|
2012-07-01 13:34:47 -04:00
|
|
|
* `Time#change` now works with time values with offsets other than UTC or the local time zone. *Andrew White*
|
2012-07-01 04:11:21 -04:00
|
|
|
|
2012-07-01 13:34:47 -04:00
|
|
|
* `ActiveSupport::Callbacks`: deprecate usage of filter object with `#before` and `#after` methods as `around` callback. *Bogdan Gusiev*
|
2012-06-24 03:30:34 -04:00
|
|
|
|
2012-07-01 13:34:47 -04:00
|
|
|
* Add `Time#prev_quarter` and `Time#next_quarter` short-hands for `months_ago(3)` and `months_since(3)`. *SungHee Kang*
|
2012-05-20 01:33:58 -04:00
|
|
|
|
2012-06-09 18:35:18 -04:00
|
|
|
* Remove obsolete and unused `require_association` method from dependencies. *fxn*
|
|
|
|
|
2012-06-05 11:50:48 -04:00
|
|
|
* Add `:instance_accessor` option for `config_accessor`.
|
|
|
|
|
|
|
|
class User
|
|
|
|
include ActiveSupport::Configurable
|
|
|
|
config_accessor :allowed_access, instance_accessor: false
|
|
|
|
end
|
|
|
|
|
|
|
|
User.new.allowed_access = true # => NoMethodError
|
|
|
|
User.new.allowed_access # => NoMethodError
|
|
|
|
|
|
|
|
*Francesco Rodriguez*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `ActionView::Helpers::NumberHelper` methods have been moved to `ActiveSupport::NumberHelper` and are now available via
|
|
|
|
`Numeric#to_s`. `Numeric#to_s` now accepts the formatting options `:phone`, `:currency`, `:percentage`, `:delimited`,
|
|
|
|
`:rounded`, `:human`, and `:human_size`.
|
|
|
|
|
|
|
|
*Andrew Mutz*
|
2012-05-14 20:47:55 -04:00
|
|
|
|
2012-05-23 13:31:35 -04:00
|
|
|
* Add `Hash#transform_keys`, `Hash#transform_keys!`, `Hash#deep_transform_keys`, and `Hash#deep_transform_keys!`. *Mark McSpadden*
|
2012-05-10 17:05:19 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Changed XML type `datetime` to `dateTime` (with upper case letter `T`). *Angelo Capilleri*
|
2012-05-23 03:59:13 -04:00
|
|
|
|
2012-02-24 16:29:00 -05:00
|
|
|
* Add `:instance_accessor` option for `class_attribute`. *Alexey Vakhov*
|
|
|
|
|
2012-05-19 10:46:12 -04:00
|
|
|
* `constantize` now looks in the ancestor chain. *Marc-Andre Lafortune & Andrew White*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Adds `Hash#deep_stringify_keys` and `Hash#deep_stringify_keys!` to convert all keys from a `Hash` instance into strings. *Lucas Húngaro*
|
2012-04-29 14:43:06 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Adds `Hash#deep_symbolize_keys` and `Hash#deep_symbolize_keys!` to convert all keys from a `Hash` instance into symbols. *Lucas Húngaro*
|
2012-04-29 14:43:06 -04:00
|
|
|
|
2012-05-12 11:48:34 -04:00
|
|
|
* `Object#try` can't call private methods. *Vasiliy Ermolovich*
|
2012-05-12 07:07:21 -04:00
|
|
|
|
2012-05-10 03:21:03 -04:00
|
|
|
* `AS::Callbacks#run_callbacks` remove `key` argument. *Francesco Rodriguez*
|
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `deep_dup` works more expectedly now and duplicates also values in `Hash` instances and elements in `Array` instances. *Alexey Gaziev*
|
2012-05-06 13:56:38 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Inflector no longer applies ice -> ouse to words like "slice", "police", etc. *Wes Morgan*
|
2012-04-30 03:17:01 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Add `ActiveSupport::Deprecations.behavior = :silence` to completely ignore Rails runtime deprecations. *twinturbo*
|
2012-04-17 16:01:06 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Make `Module#delegate` stop using `send` - can no longer delegate to private methods. *dasch*
|
2012-04-12 08:59:21 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `ActiveSupport::Callbacks`: deprecate `:rescuable` option. *Bogdan Gusiev*
|
2012-02-22 10:43:13 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Adds `Integer#ordinal` to get the ordinal suffix string of an integer. *Tim Gildea*
|
2012-02-04 08:08:26 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `ActiveSupport::Callbacks`: `:per_key` option is no longer supported. *Bogdan Gusiev*
|
2012-02-04 06:31:00 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `ActiveSupport::Callbacks#define_callbacks`: add `:skip_after_callbacks_if_terminated` option. *Bogdan Gusiev*
|
2012-02-03 10:57:53 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Add `html_escape_once` to `ERB::Util`, and delegate the `escape_once` tag helper to it. *Carlos Antonio da Silva*
|
2012-01-12 18:04:02 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Deprecates the compatibility method `Module#local_constant_names`,
|
|
|
|
use `Module#local_constants` instead (which returns symbols). *Xavier Noria*
|
2012-01-12 15:17:24 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Deletes the compatibility method `Module#method_names`,
|
|
|
|
use `Module#methods` from now on (which returns symbols). *Xavier Noria*
|
2011-12-25 14:11:23 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Deletes the compatibility method `Module#instance_method_names`,
|
|
|
|
use `Module#instance_methods` from now on (which returns symbols). *Xavier Noria*
|
2011-12-25 14:02:42 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* `BufferedLogger` is deprecated. Use `ActiveSupport::Logger`, or the logger
|
|
|
|
from the Ruby standard library.
|
2011-12-19 21:41:37 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
*Aaron Patterson*
|
2012-02-03 08:20:25 -05:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Unicode database updated to 6.1.0. *Norman Clarke*
|
2012-04-28 17:44:51 -04:00
|
|
|
|
2013-02-24 15:25:51 -05:00
|
|
|
* Adds `encode_big_decimal_as_string` option to force JSON serialization of `BigDecimal` as numeric instead
|
|
|
|
of wrapping them in strings for safety.
|
2012-05-30 13:18:29 -04:00
|
|
|
|
2012-09-19 19:00:28 -04:00
|
|
|
* Optimize log subscribers to check log level before doing any processing. *Brian Durand*
|
|
|
|
|
2012-08-28 15:15:12 -04:00
|
|
|
Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/activesupport/CHANGELOG.md) for previous changes.
|