2011-12-20 02:41:37 +00:00
|
|
|
## Rails 4.0.0 (unreleased) ##
|
|
|
|
|
2012-09-13 06:38:34 +00:00
|
|
|
* ActiveSupport::Deprecation is now a class. It is possible to create an instance
|
|
|
|
of deprecator. Backwards compatibility has been preserved.
|
|
|
|
|
|
|
|
You can choose which instance of the deprecator will be used.
|
|
|
|
|
|
|
|
deprecate :method_name, :deprecator => deprecator_instance
|
|
|
|
|
|
|
|
You can use ActiveSupport::Deprecation in your gem.
|
|
|
|
|
|
|
|
require 'active_support/deprecation'
|
|
|
|
require 'active_support/core_ext/module/deprecation'
|
|
|
|
|
|
|
|
class MyGem
|
|
|
|
def old_method
|
|
|
|
end
|
|
|
|
deprecate :old_method => :new_method, :deprecator => deprecator
|
|
|
|
|
|
|
|
def new_method
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.deprecator
|
|
|
|
ActiveSupport::Deprecation.new('2.0', 'MyGem')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
*Piotr Niełacny & Robert Pankowecki*
|
|
|
|
|
2012-09-03 09:42:24 +00:00
|
|
|
* `ERB::Util.html_escape` encodes single quote as `#39`. Decimal form has better support in old browsers. *Kalys Osmonov*
|
|
|
|
|
2012-09-07 14:03:07 +00:00
|
|
|
* `ActiveSupport::Callbacks`: deprecate monkey patch of object callbacks.
|
|
|
|
Using the #filter method like this:
|
|
|
|
|
|
|
|
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 22:13:49 +00: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 21:39:37 +00: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*
|
|
|
|
|
2012-06-29 02:47:46 +00:00
|
|
|
* Replace deprecated `memcache-client` gem with `dalli` in ActiveSupport::Cache::MemCacheStore
|
|
|
|
|
|
|
|
*Guillermo Iguaran*
|
|
|
|
|
2012-06-23 23:05:42 +00: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 14:11:00 +00:00
|
|
|
* `ActiveSupport::JSON::Variable` is deprecated. Define your own `#as_json` and
|
|
|
|
`#encode_json` methods for custom JSON string literals.
|
2012-08-11 03:10:11 +00:00
|
|
|
|
|
|
|
*Erich Menge*
|
|
|
|
|
|
|
|
* Add String#indent. *fxn & Ace Suares*
|
|
|
|
|
|
|
|
* Inflections can now be defined per locale. `singularize` and `pluralize`
|
|
|
|
accept locale as an extra argument.
|
|
|
|
|
|
|
|
*David Celis*
|
|
|
|
|
|
|
|
* `Object#try` will now return nil instead of raise a NoMethodError if the
|
|
|
|
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 23:54:52 +00:00
|
|
|
* `ERB::Util.html_escape` now escapes single quotes. *Santiago Pastorino*
|
2012-07-27 17:20:50 +00:00
|
|
|
|
2012-07-01 17:34:47 +00:00
|
|
|
* `Time#change` now works with time values with offsets other than UTC or the local time zone. *Andrew White*
|
2012-07-01 08:11:21 +00:00
|
|
|
|
2012-07-01 17:34:47 +00:00
|
|
|
* `ActiveSupport::Callbacks`: deprecate usage of filter object with `#before` and `#after` methods as `around` callback. *Bogdan Gusiev*
|
2012-06-24 07:30:34 +00:00
|
|
|
|
2012-07-01 17:34:47 +00:00
|
|
|
* Add `Time#prev_quarter` and `Time#next_quarter` short-hands for `months_ago(3)` and `months_since(3)`. *SungHee Kang*
|
2012-05-20 05:33:58 +00:00
|
|
|
|
2012-06-09 22:35:18 +00:00
|
|
|
* Remove obsolete and unused `require_association` method from dependencies. *fxn*
|
|
|
|
|
2012-06-05 15:50:48 +00: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*
|
|
|
|
|
2012-05-30 17:18:29 +00: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,
|
2012-05-15 00:47:55 +00:00
|
|
|
:rounded, :human, and :human_size. *Andrew Mutz*
|
|
|
|
|
2012-05-23 17:31:35 +00:00
|
|
|
* Add `Hash#transform_keys`, `Hash#transform_keys!`, `Hash#deep_transform_keys`, and `Hash#deep_transform_keys!`. *Mark McSpadden*
|
2012-05-10 21:05:19 +00:00
|
|
|
|
2012-04-29 18:43:06 +00:00
|
|
|
* Changed xml type `datetime` to `dateTime` (with upper case letter `T`). *Angelo Capilleri*
|
2012-05-23 07:59:13 +00:00
|
|
|
|
2012-02-24 21:29:00 +00:00
|
|
|
* Add `:instance_accessor` option for `class_attribute`. *Alexey Vakhov*
|
|
|
|
|
2012-05-19 14:46:12 +00:00
|
|
|
* `constantize` now looks in the ancestor chain. *Marc-Andre Lafortune & Andrew White*
|
|
|
|
|
2012-04-29 18:43:06 +00:00
|
|
|
* Adds `Hash#deep_stringify_keys` and `Hash#deep_stringify_keys!` to convert all keys from a +Hash+ instance into strings *Lucas Húngaro*
|
|
|
|
|
|
|
|
* Adds `Hash#deep_symbolize_keys` and `Hash#deep_symbolize_keys!` to convert all keys from a +Hash+ instance into symbols *Lucas Húngaro*
|
|
|
|
|
2012-05-12 15:48:34 +00:00
|
|
|
* `Object#try` can't call private methods. *Vasiliy Ermolovich*
|
2012-05-12 11:07:21 +00:00
|
|
|
|
2012-05-10 07:21:03 +00:00
|
|
|
* `AS::Callbacks#run_callbacks` remove `key` argument. *Francesco Rodriguez*
|
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* `deep_dup` works more expectedly now and duplicates also values in +Hash+ instances and elements in +Array+ instances. *Alexey Gaziev*
|
2012-05-06 17:56:38 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Inflector no longer applies ice -> ouse to words like slice, police, ets *Wes Morgan*
|
2012-04-30 07:17:01 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Add `ActiveSupport::Deprecations.behavior = :silence` to completely ignore Rails runtime deprecations *twinturbo*
|
2012-04-17 20:01:06 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Make Module#delegate stop using `send` - can no longer delegate to private methods. *dasch*
|
2012-04-12 12:59:21 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* AS::Callbacks: deprecate `:rescuable` option. *Bogdan Gusiev*
|
2012-02-22 15:43:13 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Adds Integer#ordinal to get the ordinal suffix string of an integer. *Tim Gildea*
|
2012-02-04 13:08:26 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* AS::Callbacks: `:per_key` option is no longer supported
|
2012-02-04 11:31:00 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* `AS::Callbacks#define_callbacks`: add `:skip_after_callbacks_if_terminated` option.
|
2012-02-03 15:57:53 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Add html_escape_once to ERB::Util, and delegate escape_once tag helper to it. *Carlos Antonio da Silva*
|
2012-01-12 23:04:02 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Remove ActiveSupport::TestCase#pending method, use `skip` instead. *Carlos Antonio da Silva*
|
2012-01-21 16:32:27 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Deprecates the compatibility method Module#local_constant_names,
|
|
|
|
use Module#local_constants instead (which returns symbols). *fxn*
|
2012-01-12 20:17:24 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Deletes the compatibility method Module#method_names,
|
|
|
|
use Module#methods from now on (which returns symbols). *fxn*
|
2011-12-25 19:11:23 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Deletes the compatibility method Module#instance_method_names,
|
|
|
|
use Module#instance_methods from now on (which returns symbols). *fxn*
|
2011-12-25 19:02:42 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger
|
|
|
|
from Ruby stdlib.
|
2011-12-20 02:41:37 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Unicode database updated to 6.1.0.
|
2012-02-03 13:20:25 +00:00
|
|
|
|
2012-05-09 12:40:08 +00:00
|
|
|
* Adds `encode_big_decimal_as_string` option to force JSON serialization of BigDecimals as numeric instead
|
|
|
|
of wrapping them in strings for safety.
|
2012-04-28 21:44:51 +00:00
|
|
|
|
2012-05-30 17:18:29 +00:00
|
|
|
* Remove deprecated ActiveSupport::JSON::Variable. *Erich Menge*
|
|
|
|
|
2012-08-28 19:15:12 +00:00
|
|
|
Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/activesupport/CHANGELOG.md) for previous changes.
|