lib/active_scaffold/extensions/action_view_rendering.rb
# override the render method to use our @lookup_context instead of the
# memoized @_lookup_context
override the render method to use our @lookup_context instead of the
memoized @_lookup_context
override the render method to use our @lookup_context instead of the memoized @_lookup_context
def render(options = {}, locals = {}, &block)
          case options
          when Hash
            in_rendering_context(options) do |_|
              temp_renderer = ActionView::Renderer.new(@lookup_context)
              if block_given?
                temp_renderer.render_partial(self, options.merge(partial: options[:layout]), &block)
              else
                temp_renderer.render(self, options)
              end
            end
          else
            view_renderer.render_partial(self, partial: options, locals: locals, &block)
          end
        end
def render ( options = { } , locals = { } , & block ) case options when Hash in_rendering_context ( options ) do | _ | temp_renderer = ActionView :: Renderer . new ( @lookup_context ) if block_given? temp_renderer . render_partial ( self , options . merge ( partial : options [ :layout ] ) , & block ) else temp_renderer . render ( self , options ) end end else view_renderer . render_partial ( self , partial : options , locals : locals , & block ) end end
override the render method to use our @lookup_context instead of the
memoized @_lookup_context
override the render method to use our @lookup_context instead of the memoized @_lookup_context
# previously set view paths and lookup context are lost here # if you use view_renderer, so instead create a new renderer # with our context
options
<not_specific>
locals
<not_specific>
block
<not_specific>