<name>

Renders the name of the current context using a variety of methods.

Details

  • Equivalent to <nil-view> if this is nil
  • Equivalent to <count> if this is an Array
  • Equivalent to <type-name> if this is a class
  • If the context has a name_attribute defined, equivalent to <view:abc/> (where abc is the name attribute)
  • Finally falls back to this.to_s (html escaped), but only if the user has view permission for this

Attributes

  • if-present: if given, nothing at all will be rendered for nil values (as opposed to rendering <nil-view>)

Show Source


Edit this page