instance method view_context

Ruby on Rails 3.1.12

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()

An instance of a view class. The default view class is ActionView::Base

The view class must have the following methods: View.new[lookup_context, assigns, controller]

Create a new ActionView instance for a controller

View#render

Returns String with the rendered template

Override this method in a module to change the default behavior.

Source
# File actionpack/lib/abstract_controller/rendering.rb, line 86
    def view_context
      view_context_class.new(view_renderer, view_assigns, self)
    end

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

Defined in AbstractController::Rendering

Type at least 2 characters to search.

↑↓ navigate · open · esc close