Skip to content

Rails 3: undefined method render_template' for class ActionView::Template' (NameError) #17

@galetahub

Description

@galetahub

We need some fix in file "actionview_extension.rb" (http://github.com/brynary/rack-bug/blob/master/lib/rack/bug/panels/templates_panel/actionview_extension.rb)

ActionView::Template now has method "render" and "virtual_path". So please replace file "actionview_extension.rb":

if defined?(ActionView) && defined?(ActionView::Template)
  ActionView::Template.class_eval do

    def render_with_rack_bug(*args, &block)
      Rack::Bug::TemplatesPanel.record(virtual_path) do
        render_without_rack_bug(*args, &block)
      end
    end

    alias_method_chain :render, :rack_bug
  end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions