<name>
Renders the name of the current context using a variety of methods.
Details
- Equivalent to
<nil-view>ifthisis nil - Equivalent to
<count>ifthisis an Array - Equivalent to
<type-name>ifthisis a class - If the context has a
name_attributedefined, equivalent to<view:abc/>(whereabcis 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>)