instance method view_context_class

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v4.0.13

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13

Signature

view_context_class()

No documentation comment.

Source
# File actionpack/lib/abstract_controller/rendering.rb, line 47
      def view_context_class
        @view_context_class ||= begin
          controller = self
          Class.new(ActionView::Base) do
            if controller.respond_to?(:_routes)
              include controller._routes.url_helpers
            end

            if controller.respond_to?(:_helpers)
              include controller._helpers

              # TODO: Fix RJS to not require this
              self.helpers = controller._helpers
            end
          end
        end
      end

Defined in actionpack/lib/abstract_controller/rendering.rb line 47 · View on GitHub · Improve this page · Find usages on GitHub

Defined in AbstractController::Rendering::ClassMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close