【发布时间】:2011-09-03 08:08:10
【问题描述】:
这是我的 ask.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"}
而且,当我在本地机器上使用 shotgun 或普通 ruby 运行它并运行主 .rb 文件时,它会像这样:
<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 的旧文件。我已确认较新的文件在服务器上。
【问题讨论】:
标签: ruby post nginx sinatra haml