aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r--activesupport/CHANGELOG.md87
1 files changed, 82 insertions, 5 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 9a00825247..2656d3f113 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,15 +1,92 @@
-* Implements an evented file system monitor to asynchronously detect changes
- in the application source code, routes, locales, etc.
+## Rails 5.0.0.beta1 (December 18, 2015) ##
- To opt-in load the [listen](https://github.com/guard/listen) gem in `Gemfile`:
+* No changes.
+
+
+* Add thread_m/cattr_accessor/reader/writer suite of methods for declaring class and module variables that live per-thread.
+ This makes it easy to declare per-thread globals that are encapsulated. Note: This is a sharp edge. A wild proliferation
+ of globals is A Bad Thing. But like other sharp tools, when it's right, it's right.
+
+ 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
+
+ def self.reset() self.account = self.user = nil end
+ end
+
+ class ApplicationController < ActiveController::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])
+ end
+ end
+
+ class MessagesController < ApplicationController
+ def create
+ @message = Message.create!(message_params)
+ end
+ end
+
+ class Message < ApplicationRecord
+ has_many :events
+ after_create :track_created
+
+ private
+ def track_created
+ events.create! origin: self, action: :create
+ end
+ end
+
+ class Event < ApplicationRecord
+ belongs_to :creator, class_name: 'User'
+ before_validation { self.creator ||= Current.user }
+ end
+
+ *DHH*
+
+
+* Deprecated `Module#qualified_const_` in favour of the builtin Module#const_
+ methods.
+
+ *Genadi Samokovarov*
+
+* Deprecate passing string to define callback.
+
+ *Yuichiro Kaneko*
+
+* `ActiveSupport::Cache::Store#namespaced_key`,
+ `ActiveSupport::Cache::MemCachedStore#escape_key`, and
+ `ActiveSupport::Cache::FileStore#key_file_path`
+ are deprecated and replaced with `normalize_key` that now calls `super`.
+
+ `ActiveSupport::Cache::LocaleCache#set_cache_value` is deprecated and replaced with `write_cache_value`.
+
+ *Michael Grosser*
+
+* Implements an evented file watcher to asynchronously detect changes in the
+ application source code, routes, locales, etc.
+
+ This watcher is disabled by default, applications my enable it in the configuration:
+
+ # config/environments/development.rb
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
+
+ This feature depends on the [listen](https://github.com/guard/listen) gem:
group :development do
- gem 'listen', '~> 3.0.4'
+ gem 'listen', '~> 3.0.5'
end
*Puneet Agarwal* and *Xavier Noria*
-* Added `Time#days_in_year` to return the number of days in the given year, or the
+* Added `Time.days_in_year` to return the number of days in the given year, or the
current year if no argument is provided.
*Jon Pascoe*