123456789_123456789_123456789_123456789_123456789_

Module: ActionView::Rendering::ClassMethods

Relationships & Source Files
Defined in: actionview/lib/action_view/rendering.rb

Instance Method Summary

Instance Method Details

#_helpers

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 48

def _helpers
end

#_routes

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 45

def _routes
end

#build_view_context_class(klass, supports_path, routes, helpers)

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 51

def build_view_context_class(klass, supports_path, routes, helpers)
  Class.new(klass) do
    if routes
      include routes.url_helpers(supports_path)
      include routes.mounted_helpers
    end

    if helpers
      include helpers
    end
  end
end

#view_context_class

[ GitHub ]

  
# File 'actionview/lib/action_view/rendering.rb', line 64

def view_context_class
  klass = ActionView::LookupContext::DetailsKey.view_context_class(ActionView::Base)

  @view_context_class ||= build_view_context_class(klass, supports_path?, _routes, _helpers)

  if klass.changed?(@view_context_class)
    @view_context_class = build_view_context_class(klass, supports_path?, _routes, _helpers)
  end

  @view_context_class
end