title: Access translation file (i18n) from inside rails model
body: <p>What I have in my model is:</p>
  
  <pre><code>def body_color_enum
    [
      ['Aqua', '#009c9c'],
      ['Grey', '#6d6e71'],
      ['Yellow', '#ffe600'],
      ['White', 'white']
    ]
  end
  </code></pre>
  
  <p>I want these values to come from the translation file 'en.yml'</p>
  
  <pre><code>en:
    group:
      hero:
        hex1: '#6d6e71'
        name1: 'Dark grey'
        hex2: '#ccc'
        name2: 'Light grey'
        hex3: '#0099ce'
        name3: 'Blue'
        hex4: '#ffffff'
        name4: 'White'
  </code></pre>
  
  <p>I have tried this:</p>
  
  <pre><code>def body_color_enum
    [
      [t('group.hero.name1'), '#009c9c'],
      ['Grey', '#6d6e71'],
      ['Yellow', '#ffe600'],
      ['White', 'white']
    ]
  end
  </code></pre>
  
  <p>But i get this error:</p>
  
  <pre><code>undefined method `t' for #&lt;Group:0x007fabad847ac8&gt;
  </code></pre>
  
  <p>So what I'm asking is how can I access my local file from the model so I can set my values in the body_color_enum method.</p>