<name>
Renders the name of the current context using a variety of methods.
Details
- Equivalent to
<nil-view>
ifthis
is nil - Equivalent to
<count>
ifthis
is an Array - Equivalent to
<type-name>
ifthis
is a class - If the context has a
name_attribute
defined, equivalent to<view:abc/>
(whereabc
is the name attribute) - Finally falls back to
this.to_s
(html escaped), but only if the user has view permission forthis
Attributes
- if-present: if given, nothing at all will be rendered for nil values (as opposed to rendering
<nil-view>
)