title: Rails 3.2.11 asset precompile fails if threadsafe! enabled
body: <p>I'm on Rails 3.2.11 and ruby 1.9.3.125</p>
  
  <p>My app is working ok in devel and production if threadsafe! off</p>
  
  <p>With threadsafe! enabled I get an error during precompiling, in my asset
  assetsolutions.js.erb (which is the main js file of the application) I use the
  Workorder class as in the next line
  if ($('#workorder_worktype').val()=='&lt;%= Workorder::REPAIR %>')</p>
  
  <p>with threadsafe! the class can't be found at precompile time, I've done some reasearch and I think it may be related with rails switching off eager loading if threadsafe! is on</p>
  
  <p>How can I include the Workorder class to make precompile work?</p>
  
  <p>error follows:</p>
  
  <p>c:/rails3/ruby/bin/ruby.exe c:/rails3/Ruby/bin/rake assets:precompile:all RAILS_
  ENV=production RAILS_GROUPS=assets
  rake aborted!
  uninitialized constant #::Workorder
    (in C:/rails3/applications/assetsolutions/app/assets/javascripts/preloaded/ass
  etsolution.js.erb)
  C:/rails3/applications/assetsolutions/app/assets/javascripts/preloaded/assetsolu
  tion.js.erb:763:in `evaluate_source'
  Tasks: TOP => assets:precompile:primary
  (See full trace by running task with --trace)
  rake aborted!
  Command failed with status (1): [c:/rails3/ruby/bin/ruby.exe c:/rails3/Ruby...]</p>
  
  <p>Tasks: TOP => assets:precompile
  (See full trace by running task with --trace)</p>
  
  <p>Tnx
  Fabio</p>