Methods
- _helpers
- _routes
- build_view_context_class
- eager_load!
- inherit_view_context_class?
- view_context_class
Instance Public methods
_helpers()
📝 Source code
# File actionview/lib/action_view/rendering.rb, line 49
def _helpers
end
🔎 See on GitHub
_routes()
📝 Source code
# File actionview/lib/action_view/rendering.rb, line 46
def _routes
end
🔎 See on GitHub
build_view_context_class(klass, supports_path, routes, helpers)
📝 Source code
# File actionview/lib/action_view/rendering.rb, line 59
def build_view_context_class(klass, supports_path, routes, helpers)
if inherit_view_context_class?
return superclass.view_context_class
end
Class.new(klass) do
if routes
include routes.url_helpers(supports_path)
include routes.mounted_helpers
end
if helpers
include helpers
end
end
end
🔎 See on GitHub
eager_load!()
📝 Source code
# File actionview/lib/action_view/rendering.rb, line 76
def eager_load!
super
view_context_class
nil
end
🔎 See on GitHub
inherit_view_context_class?()
📝 Source code
# File actionview/lib/action_view/rendering.rb, line 52
def inherit_view_context_class?
superclass.respond_to?(:view_context_class) &&
supports_path? == superclass.supports_path? &&
_routes.equal?(superclass._routes) &&
_helpers.equal?(superclass._helpers)
end
🔎 See on GitHub
view_context_class()
📝 Source code
# File actionview/lib/action_view/rendering.rb, line 82
def view_context_class
klass = ActionView::LookupContext::DetailsKey.view_context_class
@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
🔎 See on GitHub