File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
actionview/lib/action_view Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ module ActionView
15
15
class LookupContext #:nodoc:
16
16
attr_accessor :prefixes , :rendered_format
17
17
18
- mattr_accessor :registered_details , default : [ ]
18
+ singleton_class . attr_accessor :registered_details
19
+ self . registered_details = [ ]
19
20
20
21
def self . register_detail ( name , &block )
21
22
registered_details << name
@@ -176,7 +177,7 @@ def detail_args_for_any
176
177
@detail_args_for_any ||= begin
177
178
details = { }
178
179
179
- registered_details . each do |k |
180
+ LookupContext . registered_details . each do |k |
180
181
if k == :variants
181
182
details [ k ] = :any
182
183
else
@@ -238,7 +239,7 @@ def with_prepended_formats(formats)
238
239
end
239
240
240
241
def initialize_details ( target , details )
241
- registered_details . each do |k |
242
+ LookupContext . registered_details . each do |k |
242
243
target [ k ] = details [ k ] || Accessors ::DEFAULT_PROCS [ k ] . call
243
244
end
244
245
target
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def format
158
158
159
159
def extract_details ( options ) # :doc:
160
160
details = nil
161
- @lookup_context . registered_details . each do |key |
161
+ LookupContext . registered_details . each do |key |
162
162
value = options [ key ]
163
163
164
164
if value
You can’t perform that action at this time.
0 commit comments