Sha256: 5bddfa6d3fddd6b39774f64d7a03a67fba74b02b40b0f61566f027c8f1e9c24d
Contents?: true
Size: 820 Bytes
Versions: 33
Compression:
Stored size: 820 Bytes
Contents
<!-- Renders a human readable version of the type of the context ### Details - If `this` is already a class, the name of that class is used - Otherwise, first `this.member_class` (for collections), then `this.class` are tried - By default the name is titleised and singular. ### Attributes - plural: pluralise the name - lowercase: render the name in all lower case - dasherize: render the name in lower case with dashes instead of spaces. --> <def tag="type-name" attrs="plural, lowercase, dasherize"><%= type ||= (this if this.is_a?(Class)) || this.try.member_class || this.class name = type.respond_to?(:model_name) ? type.model_name.human : type.name name = dasherize ? name.underscore.dasherize : name.titleize name = name.pluralize if plural name = name.downcase if lowercase name %></def>
Version data entries
33 entries across 33 versions & 1 rubygems