2015-04-01 63 views
0

我的JavaScript的这个片段在视图Ruby on Rails的JavaScript的越来越截断

<script type="text/javascript"> 
    function save_RefMD(apt_id,refmd_id) { 
     //get the value of the text box 
     cb = document.getElementById("selectall"); 
     if(cb == null){ 
      document.location.href ='/apts/save_refmd?id='+apt_id+'&refmd_id='+refmd_id; 
     } else { 
      document.location.href ='/apts/save_refmd?id='+apt_id+'&refmd_id='+refmd_id+'&all='+cb.checked; 
     } 
    } 
</script> 

当我运行本地轨服务器,并期待在该视图的页面的源代码。完全一样。但是,当我查看源后,它被部署到它看起来像这样

 <script type="text/javascript"> 
    function save_RefMD(apt_id,refmd_id) { 
     //get the value of the text box 
     cb = document.getElementById("selectall"); 
     document.location.href ='/apts/save_refmd?id='+apt_id+'&refmd_id='+refmd_id+'&all='+cb.checked; 
    } 
    </script> 

Web服务器完全剔除了我,如果...别的。任何人都知道发生了什么?

+2

你确定它是“剥离”,而不只是使用过时的版本? – 2015-04-01 21:41:17

+0

:(我想我跑了一个更复杂的原因... – bopritchard 2015-04-01 21:55:47

+0

所以这就是答案?它只是一个过时的版本? – smathy 2015-04-01 22:49:59

回答

0

是的,这只是旧代码被部署。其他人负责部署,我被告知我的东西在那里。假设,假设。对不起,麻烦了。