3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/defer_draper/action_controller.rb', line 3
def render(options = nil, = {}, &block)
if self.defer_draper_decorate
self.instance_variables.select {|variable|
not variable.to_s.start_with?('@_')
}.map {|variable_name|
[variable_name, self.instance_variable_get(variable_name)]
}.select {|variable_name, variable|
variable.respond_to?(:decorate)
}.each {|variable_name, variable|
begin
self.instance_variable_set(variable_name, variable.decorate)
rescue Draper::UninferrableDecoratorError
;
end
}
end
super(options, , &block)
end
|