diff options
Diffstat (limited to 'actionpack/lib/action_view/renderable.rb')
-rw-r--r-- | actionpack/lib/action_view/renderable.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/renderable.rb b/actionpack/lib/action_view/renderable.rb index c23b8cde89..7258ad04bf 100644 --- a/actionpack/lib/action_view/renderable.rb +++ b/actionpack/lib/action_view/renderable.rb @@ -29,7 +29,9 @@ module ActionView stack.push(self) # This is only used for TestResponse to set rendered_template - view.instance_variable_set(:@_first_render, self) unless view.instance_variable_get(:@_first_render) + unless is_a?(InlineTemplate) || view.instance_variable_get(:@_first_render) + view.instance_variable_set(:@_first_render, self) + end view.send(:_evaluate_assigns_and_ivars) view.send(:_set_controller_content_type, mime_type) if respond_to?(:mime_type) @@ -94,7 +96,7 @@ module ActionView # The template will be compiled if the file has not been compiled yet, or # if local_assigns has a new key, which isn't supported by the compiled code yet. def recompile?(symbol) - !(ActionView::PathSet::Path.eager_load_templates? && Base::CompiledTemplates.method_defined?(symbol)) + !Base::CompiledTemplates.method_defined?(symbol) || !loaded? end end end |