为了避免新建的时候重复的点击提交按钮,可以加一个限制
<%= f.submit nil, :class => 'btn btn-primary', :data => { :"disable-with" => "请稍等..." } %>