rails/activesupport/lib/active_support
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
..
cache Use recyclable cache keys (#29092) 2017-05-18 18:12:32 +02:00
concurrency Remove deprecated class ActiveSupport::Concurrency::Latch 2016-11-14 12:44:19 +00:00
core_ext Assorted delegate_missing_to doc fixes 2017-05-04 16:29:00 -04:00
dependencies applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
deprecation Define path with __dir__ 2017-05-23 00:53:51 +03:00
duration 🙈 :nodoc: AS::Duration::ISO8601Serializer 2017-02-23 10:55:06 -08:00
inflector Use keyword arguments instead of hash 2017-03-28 18:02:00 -04:00
json Merge pull request #26933 from prathamesh-sonpatki/fix-26877 2016-11-13 14:46:21 +00:00
locale Add support for Petabyte and Exabyte in number to human size 2015-12-22 23:07:06 +05:30
log_subscriber Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
multibyte Define path with __dir__ 2017-05-23 00:53:51 +03:00
notifications Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
number_helper No need to nodoc private methods 2016-12-24 11:36:51 +09:00
testing Explicitly require AS::Time in AS::Testing::TimeHelpers 2017-04-18 15:43:01 -04:00
values There are actually only 134 unique timezones. 2017-04-16 15:03:31 -07:00
xml_mini Fixes Hash.from_xml with frozen strings for all backends 2017-04-20 16:31:50 -04:00
all.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
array_inquirer.rb Unused &block parameter 2017-01-15 02:44:03 +09:00
backtrace_cleaner.rb Add module name to BacktraceCleaner usage example [ci skip] 2017-01-22 19:19:13 +09:00
benchmarkable.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
builder.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
cache.rb Fix a RuboCop offences using rubocop -a 2017-05-24 15:21:17 +09:00
callbacks.rb Remove outdated comment 2017-04-20 16:20:00 +09:00
concern.rb Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classes 2015-06-12 17:35:21 +02:00
configurable.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
core_ext.rb Define path with __dir__ 2017-05-23 00:53:51 +03:00
current_attributes.rb Clear all current instances before a reload. 2017-05-28 10:47:17 +02:00
dependencies.rb Fix require_dependency message format 2016-11-25 06:56:05 +09:00
deprecation.rb Send deprecation horizon and gem name as arguments to deprecation heavier handler, and make sure they are used for the ActiveSupport::Notifications message. 2017-04-19 18:23:28 -04:00
descendants_tracker.rb
duration.rb Fix implicit calculations with scalars and durations 2017-05-20 16:36:25 +01:00
evented_file_update_checker.rb starts_with? is removed in Ruby 2.4 2017-03-28 16:01:35 -04:00
execution_wrapper.rb class Foo < Struct.new(:x) creates an extra unneeded anonymous class 2017-01-13 15:13:47 +09:00
executor.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
file_update_checker.rb Raise in the initialize not in the execute 2017-01-31 01:15:07 -05:00
gem_version.rb Start Rails 5.2 development 2017-03-22 10:11:39 +10:30
gzip.rb Add missing gzip footer check in ActiveSupport::Gzip.decompress 2017-02-24 17:33:36 -05:00
hash_with_indifferent_access.rb Implement fetch_values for HashWithIndifferentAccess (#28316) 2017-04-10 10:20:13 +09:30
i18n_railtie.rb Use flat_map rather than map(&:...).flatten 2017-04-29 23:30:38 +09:00
i18n.rb Define path with __dir__ 2017-05-23 00:53:51 +03:00
inflections.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
inflector.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
json.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
key_generator.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
lazy_load_hooks.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
log_subscriber.rb Privatize unneededly protected methods in Active Support 2016-12-24 11:39:05 +09:00
logger_silence.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
logger_thread_safe_level.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
logger.rb Broadcast#silence breaks custom loggers that does not include LoggerSilence. 2016-10-24 18:26:13 +08:00
message_encryptor.rb Merge pull request #29086 from mikeycgto/message-encryptor-auth-tag-check 2017-05-15 21:20:12 +02:00
message_verifier.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
multibyte.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
notifications.rb Add error logging to Active Job 2017-03-27 17:10:24 -07:00
number_helper.rb Remove redundant right parentheses in number_helper [ci skip] 2017-01-31 20:13:03 +09:00
option_merger.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
ordered_hash.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
ordered_options.rb Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
per_thread_registry.rb Privatize unneededly protected methods in Active Support 2016-12-24 11:39:05 +09:00
proxy_object.rb
rails.rb let Regexp#match? be globally available 2016-10-27 09:13:55 +02:00
railtie.rb Clear all current instances before a reload. 2017-05-28 10:47:17 +02:00
reloader.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
rescuable.rb handle loops in the cause chain in Rescuable#rescue_with_handler 2017-05-10 13:33:46 -04:00
security_utils.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
string_inquirer.rb AS::StringInquirer#respond_to_missing? should fallback to super 2017-01-15 03:38:06 +09:00
subscriber.rb Privatize unneededly protected methods in Active Support 2016-12-24 11:39:05 +09:00
tagged_logging.rb Format and send logs to logger.fatal from DebugExceptions instead of calling fatal multiple times. Expose tags_text from TaggedLogging to be used for log formatting 2016-11-12 15:47:39 -05:00
test_case.rb Use on_load to trigger commandline processing code 2016-10-21 14:44:17 -07:00
time_with_zone.rb Add additional options to time change methods 2017-04-14 18:04:13 +01:00
time.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
version.rb applies new string literal convention in activesupport/lib 2016-08-06 18:10:53 +02:00
xml_mini.rb Fix Rubocop violations and fix documentation visibility 2016-12-28 21:53:51 -05:00