diff options
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 121 |
1 files changed, 92 insertions, 29 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 21c79949ca..15dc9946c5 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,66 @@ +* Prevent `Marshal.load` from looping infinitely when trying to autoload a constant + which resolves to a different name. + + *Olek Janiszewski* + +* Deprecate `Module.local_constants`. Please use `Module.constants(false)` instead. + + *Yuichiro Kaneko* + +* Publish ActiveSupport::Executor and ActiveSupport::Reloader APIs to allow + components and libraries to manage, and participate in, the execution of + application code, and the application reloading process. + + *Matthew Draper* + + +## Rails 5.0.0.beta3 (February 24, 2016) ## + +* Deprecate arguments on `assert_nothing_raised`. + + `assert_nothing_raised` does not assert the arguments that have been passed + in (usually a specific exception class) since the method only yields the + block. So as not to confuse the users that the arguments have meaning, they + are being deprecated. + + *Tara Scherner de la Fuente* + +* Make `benchmark('something', silence: true)` actually work + + *DHH* + +* Add `#on_weekday?` method to `Date`, `Time`, and `DateTime`. + + `#on_weekday?` returns `true` if the receiving date/time does not fall on a Saturday + or Sunday. + + *Vipul A M* + +* Add `Array#second_to_last` and `Array#third_to_last` methods. + + *Brian Christian* + +* Fix regression in `Hash#dig` for HashWithIndifferentAccess. + + *Jon Moss* + +## Rails 5.0.0.beta2 (February 01, 2016) ## + +* Change number_to_currency behavior for checking negativity. + + Used `to_f.negative` instead of using `to_f.phase` for checking negativity + of a number in number_to_currency helper. + This change works same for all cases except when number is "-0.0". + + -0.0.to_f.negative? => false + -0.0.to_f.phase? => 3.14 + + This change reverts changes from https://github.com/rails/rails/pull/6512. + But it should be acceptable as we could not find any currency which + supports negative zeros. + + *Prathamesh Sonpatki*, *Rafael Mendonça França* + * Match `HashWithIndifferentAccess#default`'s behaviour with `Hash#default`. *David Cornu* @@ -27,44 +90,44 @@ Here's an example of a simple event tracking system where the object being tracked needs not pass a creator that it doesn't need itself along: - module Current - thread_mattr_accessor :account - thread_mattr_accessor :user + module Current + thread_mattr_accessor :account + thread_mattr_accessor :user - def self.reset() self.account = self.user = nil end - end + def self.reset() self.account = self.user = nil end + end - class ApplicationController < ActionController::Base - before_action :set_current - after_action { Current.reset } + class ApplicationController < ActionController::Base + before_action :set_current + after_action { Current.reset } - private - def set_current - Current.account = Account.find(params[:account_id]) - Current.user = Current.account.users.find(params[:user_id]) + private + def set_current + Current.account = Account.find(params[:account_id]) + Current.user = Current.account.users.find(params[:user_id]) + end end - end - class MessagesController < ApplicationController - def create - @message = Message.create!(message_params) - end - end + class MessagesController < ApplicationController + def create + @message = Message.create!(message_params) + end + end - class Message < ApplicationRecord - has_many :events - after_create :track_created + class Message < ApplicationRecord + has_many :events + after_create :track_created - private - def track_created - events.create! origin: self, action: :create + private + def track_created + events.create! origin: self, action: :create + end end - end - class Event < ApplicationRecord - belongs_to :creator, class_name: 'User' - before_validation { self.creator ||= Current.user } - end + class Event < ApplicationRecord + belongs_to :creator, class_name: 'User' + before_validation { self.creator ||= Current.user } + end *DHH* |