title: Rails on Heroku, redacto editor display twice
body: <p>In my development environment, everything is okay.</p>
  
  <p>editor work so great.</p>
  
  <p>but when app run on heroku, the WYSIWYG editor Redactor display twice.</p>
  
  <p>one default style Redactor editor, and one custom style Redactor editor.</p>
  
  <p>I try to delete custom setup, </p>
  
  <p>not working,</p>
  
  <p>it display two, two default style editor,</p>
  
  <p>ban turbolinks or modify config, it's still not working.</p>
  
  <p>wherever I do, I got two editor on the page where use Redactor.</p>
  
  <p>on Heroku the page look like:</p>
  
  <pre><code>&lt;div class="redactor-box"&gt;
    &lt;ul class="redactor-toolbar" id="redactor-toolbar-2"&gt;
    &lt;/ul&gt; 
    &lt;div class="redactor-editor"&gt;  
    &lt;/div&gt; 
    &lt;div class="redactor-box"&gt;
      &lt;ul class="redactor-toolbar" id="redactor-toolbar-3"&gt;
      &lt;/ul&gt;
      &lt;div class="redactor-editor"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In my development env, it look like:</p>
  
  <pre><code>&lt;div class="redactor-box"&gt;
    &lt;ul class="redactor-toolbar" id="redactor-toolbar-2"&gt;
    &lt;/ul&gt; 
    &lt;div class="redactor-editor"&gt;  
    &lt;/div&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>this is my code.</p>
  
  <pre><code>#app/views/articles/new.html.erb
  
  
  &lt;div class="col-md-8 col-xs-8 col-xs-offset-2 col-md-offset-2"&gt;
    &lt;%= form_for([current_user, @article]) do |f| %&gt;
      &lt;%= render 'shared/error_messages', var: @article %&gt;
  
      &lt;%= f.label :title %&gt;
      &lt;%= f.text_field :title, class: 'form-control', id: "article-title" %&gt;&lt;/br&gt;
  
      &lt;%= f.label :content %&gt;
  
      &lt;%= f.text_area :content, class: :redactor %&gt;&lt;/br&gt;
  
      &lt;%= f.submit "Save", class: "btn btn-default btn-custom" %&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and this is my Redactor config.</p>
  
  <pre><code>#app/assets/javascripts/redactor-rails/config.js
  
  
  window.init_redactor = function(){
    var csrf_token = $('meta[name=csrf-token]').attr('content');
    var csrf_param = $('meta[name=csrf-param]').attr('content');
    var params;
    if (csrf_param !== undefined &amp;&amp; csrf_token !== undefined) {
        params = csrf_param + "=" + encodeURIComponent(csrf_token);
    }
    $('.redactor').redactor({
  
          "imageUpload":"/redactor_rails/pictures?" + params,
          "imageGetJson":"/redactor_rails/pictures",
          "fileUpload":"/redactor_rails/documents?" + params,
          "fileGetJson":"/redactor_rails/documents",
          "path":"/assets/redactor-rails",
          "css":"style.css",
          "minHeight" : 300
        });
  }
  
  $(document).on( 'ready page:load', window.init_redactor );
  </code></pre>
  
  <p>rails '4.2.3'</p>
  
  <p>redactor-rails '0.5.0'</p>
  
  <p>Thanks for read.</p>
  
  <hr>
  
  <p>update</p>
  
  <p>when I delete all config file, not just change some setup,</p>
  
  <p>I got right display.</p>
  
  <p>but if I do that, I can't custom my editor.</p>
  
  <p>finally, I use CSS solve the problem.
  it's a stupid way, </p>
  
  <p>The extra editor just be hidden, not disappear.</p>
  
  <pre><code>    .fix-box { 
        margin-top: 110px;
        .redactor-box {
          #redactor-toolbar-2 {
            display: none;
          }
          .redactor-box {
            margin-top: -110px;
          }
        }
      } 
  </code></pre>