title: Should Rails uglifier uglify (mangle) function names?
body: <p>My .js files are compressed and variables mangled, but function names are not mangled (running latest Rails 3.2.8 and latest uglify 1.3.0 gem) on Heroku.</p>
  
  <p>According to <a href="https://github.com/lautis/uglifier#usage" rel="nofollow">https://github.com/lautis/uglifier#usage</a> the "mangle" option defaults to true. Below is my config.</p>
  
  <p>From production.rb:</p>
  
  <pre><code>config.assets.compress = true
  config.assets.js_compressor  = :uglifier
  </code></pre>
  
  <p>I've also tried</p>
  
  <pre><code>config.assets.compress = true
  config.assets.js_compressor  = Uglifier.new(:mangle =&gt; true, :toplevel =&gt; true, :copyright =&gt; true)
  </code></pre>
  
  <p>but with no noticable difference.</p>
  
  <p>As one commenter suggested, I did try changing contents of one my .js files, but didn't make a difference.</p>
  
  <p>Example from output of the compressed precompiled .js file on Heroku:</p>
  
  <pre><code>show_slideout_notification=function(){jQuery(".slideout_notification").slideDown();var e=$(".slideout_notification .countdown
  </code></pre>
  
  <p>Seems that variable names are mangled, but function names are not.</p>
  
  <p>Any ideas why function names are not mangled? Or is this not wanted behaviour as it would then be difficult to call the functions from my Rails/js code (i.e. javascript onclick events). Or would those onclick calls be renamed to the mangled name too if the function names were mangled?</p>
  
  <p>Thanks :-)</p>