2011-09-02 44 views
0

这是我在我的ask.haml文件代码:问题与形式不张贴使用Nginx的,红宝石,HAML和西纳特拉

%form{:action => "/calendar", :method => "post"} 
      .inputRow 
       %label How many days in a row do you work? 
       %input#on{:name => "on", :tabindex => "1", :title => "Number of days in a row you work", :type => "text", :value => "4", :id=> "on"}/ 
      .inputRow 
       %label How many days in a row are you off? 
       %input#off{:name => "off", :tabindex => "2", :title => "Number of days in a row you're off", :type => "text", :value => "3", :id=> "off"}/ 
      .inputRow 
       %label When is the start of your next block off? 
       %input#date{:name => "date", :tabindex => "3", :title => "Start of your next block off", :type => "text", :value => "8/31/2011", :id=> "date"}/ 
      %button#button{:type => "submit"} 

而且,当我用猎枪两种或只是简单的在我的本地机器上运行这个红宝石和运行主文件名为.rb它rends像这样:

<form action='/calendar' method='post'> 
      <div class='inputRow'> 
      <label>How many days in a row do you work?</label> 
      <input id='on_on' name='on' tabindex='1' title='Number of days in a row you work' type='text' value='4' /> 
      </div> 
      <div class='inputRow'> 
      <label>How many days in a row are you off?</label> 
      <input id='off_off' name='off' tabindex='2' title="Number of days in a row you're off" type='text' value='3' /> 
      </div> 
      <div class='inputRow'> 
      <label>When is the start of your next block off?</label> 
      <input id='date_date' name='date' tabindex='3' title='Start of your next block off' type='text' value='8/31/2011' /> 
      </div> 
      <button id='button' type='submit'></button> 
     </form> 

但是,当我把它上传到我的服务器(webfaction),并重新启动nginx的就算了,我得到这个:

<form> 
     <div class="inputRow"><label>How many days in a row do you work?</label><input type="text" name="on" value="" id="on" tabindex="1" placeholder="4" title="Number of days in a row you work" /></div> 
     <div class="inputRow"><label>How many days in a row are you off?</label><input type="text" name="off" value="" id="off" tabindex="2" placeholder="3" title="Number of days in a row you're off" /></div> 
     <div class="inputRow"><label>When's the start of your next block off?</label><input type="text" name="on" value="" id="on" tabindex="3" placeholder="8/31/2011" title="Start of your next block off" /></div> 
     <button type="submit" id="button"></button> 
     </form> 

该信息以及指向它的页面缺失。关于如何开始解决这个问题的任何想法?提前致谢。

更新:正如我已经深入了解了这一点,它看起来像nginx加载一个名为ask.haml的旧文件。我已经确认新文件在服务器上。

回答

1

听起来像你可能会在浏览器中缓存html。尝试打开一个不同的浏览器(或者明确地清空浏览器cacche)并将其瞄准您的产品应用程序。

+0

这个问题是某种程度上index.html进入我的/公共目录和nginx加载,而不是模板。 (还是)感谢你的建议。 –