Description:
Rails includes a class called ActiveSupport::CurrentAttributes that can be used to store values that relate only to the current request or job.
For example:
class Current < ActiveSupport::CurrentAttributes
attribute :user
end
Current.user = User.first
How does Rails store these values?
How can it ensure these values can only be read in the current request?
What happens when you change the isolation level?
From a practical standpoint, what does the isolation level mean?
Description: Rails includes a class called
ActiveSupport::CurrentAttributes
that can be used to store values that relate only to the current request or job.For example:
How does Rails store these values? How can it ensure these values can only be read in the current request? What happens when you change the isolation level? From a practical standpoint, what does the isolation level mean?
Estimated Talk Time: 10–15 minutes