Method: Alchemy::ElementEditor#translated_group

Defined in:
app/decorators/alchemy/element_editor.rb

#translated_group(group) ⇒ Object

Returns the translated ingredient group for displaying in admin editor group headings

Translate it in your locale yml file:

alchemy:
  element_groups:
    foo: Bar

Optionally you can scope your ingredient role to an element:

alchemy:
  element_groups:
    article:
      foo: Baz


43
44
45
46
47
48
49
# File 'app/decorators/alchemy/element_editor.rb', line 43

def translated_group(group)
  Alchemy.t(
    group,
    scope: "element_groups.#{element.name}",
    default: Alchemy.t("element_groups.#{group}", default: group.humanize)
  )
end