Sha256: 883ca4fc92c82829408db3a19236d74c9f4f6a2ccebab9634eeb5f65237b6f05
Contents?: true
Size: 840 Bytes
Versions: 33
Compression:
Stored size: 840 Bytes
Contents
<!-- Renders a human readable name of a collection Use this tag for en locale only. Use human-collection-name for i18n. ### Details - Uses `this.origin_attribute` as the name. - Falls back to `<type-name>` otherwise. - By default the name is titleised and plural. ### Attributes - singular: singularise the name - lowercase: render the name in all lower case - dasherize: render the name in lower case with dashes instead of spaces. --> <def tag="collection-name" attrs="singular, lowercase, dasherize"><%= if (attr = this.try.origin_attribute) name = attr.to_s name = dasherize ? name.underscore.dasherize : name.titleize name = name.singularize if singular name = name.downcase if lowercase name else type_name(:plural => !singular, :lowercase => lowercase, :dasherize => dasherize) end %></def>
Version data entries
33 entries across 33 versions & 1 rubygems