Module: Compony::ViewHelpers
- Included in:
- ControllerMixin
- Defined in:
- lib/compony/view_helpers.rb
Overview
Methods in this module are available in content blocks and Rails views. Rule of thumb: this holds methods that require a view context and results are rendered immediately.
Instance Method Summary collapse
-
#render_intent(button: {}) ⇒ Object
Renders a button/link to a component given a comp and model or family.
Instance Method Details
#render_intent(button: {}) ⇒ Object
Renders a button/link to a component given a comp and model or family. If authentication is configured
and the current user has insufficient permissions to access the target object, the link is not displayed.
When inside a request context (content do...), this is preceded by RequestContext#render_intent.
11 12 13 |
# File 'lib/compony/view_helpers.rb', line 11 def render_intent(*, button: {}, **) Compony.intent(*, **).render(self, **) end |