Hobo Cookbook

View Source



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


  • 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


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

Show Source


No comments to display