instance method view_context_class

Ruby on Rails 4.2.9

Since v4.1.16

Available in: v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

view_context_class()

No documentation comment.

Source
# File actionview/lib/action_view/rendering.rb, line 36
      def view_context_class
        @view_context_class ||= begin
          supports_path = supports_path?
          routes  = respond_to?(:_routes)  && _routes
          helpers = respond_to?(:_helpers) && _helpers

          Class.new(ActionView::Base) do
            if routes
              include routes.url_helpers(supports_path)
              include routes.mounted_helpers
            end

            if helpers
              include helpers
            end
          end
        end
      end

Defined in actionview/lib/action_view/rendering.rb line 36 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::Rendering::ClassMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close