<name>
Renders the name of the current context using a variety of methods.
Details
- Equivalent to <nil-view> if
thisis nil - Equivalent to <count> if
thisis an Array - Equivalent to <type-name> if
thisis 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>)
Edit this page