Bootstrap表单格式不适用

时间:2014-04-22 10:36:11

标签: html css ruby twitter-bootstrap ruby-on-rails-4

我正在尝试使用嵌入式ruby中的实例变量@premail为订阅电子邮件添加表单

由于某种原因,当我在我的localhost上加载它时,表单将没有引导样式。我尝试了几件事,但我不能让表单看起来像一个bootstrap输入表单。这是我的表单的代码:

    <div class="container-form">
            <%= form_for @premail, html: {class: "form-horizontal home-form", role: "form"} do |f| %>
              <% if @premail.errors.any? %>                 
                  <h2><%= pluralize(@premail.errors.count, "error") %> prohibited this link from being saved:</h2>
                  <ul>
                  <% @premail.errors.full_messages.each do |msg| %>
                    <li><%= msg %></li>
                  <% end %>
                  </ul>
              <% end %>
              <div class="form-group">
                <p> Stay updated for our launch! </p>
                <%= f.label :email, class:"col-sm-2 control-label" %>
                <%= f.email_field :email, autofocus: true, class:"form-control", placeholder:"Enter email" %>
              </div>
              <div>
                <%= f.submit "Sign up", class:"btn btn-default" %>
              </div>
            <% end %>
      </div>

我错过了什么?

0 个答案:

没有答案