rails/activesupport
Kasper Timm Hansen 85211ea1ef Clear all current instances before a reload.
If users added an attribute or otherwise changed a CurrentAttributes subclass
they'd see exceptions on the next page load.

Because `ActiveSupport::CurrentAttributes.current_instances` would keep
references to the old instances from the previous request.

We can fix this by clearing out the `current_attributes` before we unload
constants. Then any change to the model can be autoloaded again since its
slot isn't taken by an old instance.

We'll still have to call reset before we clear so external collaborators,
like Time.zone, won't linger with their current value throughout other code.
2017-05-28 10:47:17 +02:00
..
bin Define path with __dir__ 2017-05-23 00:53:51 +03:00
lib Clear all current instances before a reload. 2017-05-28 10:47:17 +02:00
test ActiveSupport::CurrentAttributes provides a thread-isolated attributes singleton (#29180) 2017-05-26 20:00:27 +02:00
activesupport.gemspec Define path with __dir__ 2017-05-23 00:53:51 +03:00
CHANGELOG.md ActiveSupport::CurrentAttributes provides a thread-isolated attributes singleton (#29180) 2017-05-26 20:00:27 +02:00
MIT-LICENSE Bump license years for 2017 2016-12-31 08:34:08 -05:00
Rakefile fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
README.rdoc [ci skip] Add a dollar sign to each command in the READMEs 2015-12-06 19:18:52 +01:00

= Active Support -- Utility classes and Ruby extensions from Rails

Active Support is a collection of utility classes and standard library
extensions that were found useful for the Rails framework. These additions
reside in this package so they can be loaded as needed in Ruby projects
outside of Rails.


== Download and installation

The latest version of Active Support can be installed with RubyGems:

  $ gem install activesupport

Source code can be downloaded as part of the Rails project on GitHub:

* https://github.com/rails/rails/tree/master/activesupport


== License

Active Support is released under the MIT license:

* http://www.opensource.org/licenses/MIT


== Support

API documentation is at:

* http://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core