title: Dynamic constant definition in Rails
body: <p>I'm defining a constant in an initializer in Rails using the following syntax:</p>
  
  <pre><code>MyModule.const_set('MYCONSTANT','foobar')
  </code></pre>
  
  <p>It works, if I start a console and write</p>
  
  <pre><code>MyModule::MYCONSTANT 
  </code></pre>
  
  <p>I receive foobar as expected.</p>
  
  <p>The problem is, when I try to call it in a Model the constant is not there.</p>
  
  <p>Where should D dynamically define my constant that it can be available as well in my models? </p>
  
  <p>If I statically define it in my lib/mymodule.rb it works but I would like to define some constants at runtime.</p>