SimpleForm + ClientSideValidations + bootstrap - проверка не происходит в форме - все входные данные принимаются

Я использую гемы SimpleForm, ClientSideValidations и ClientSideValidations-SimpleForm в приложении RoR. Я могу красиво отобразить форму в модале, однако, когда ввод теряет фокус, проверка не происходит, и форма отправляется. Также обратите внимание, что я попытался использовать исправление, найденное здесь:http://www.ddarrensmith.com/blog/2012/05/17/ruby-on-rails-client-side-validation-with-validation-helpers-and-twitter-bootstrap/

Сегмент представления, содержащий форму:

<div class='modal hide' id='New_Discrep' tabindex="-1" role='dialog' aria-labelledby="#New_Discrep_Label" aria-hidden='true'>
  <div class="modal-header">
    <button type='button' class='close' data-dismiss='modal' aria-    hidden='true'>x</button>
    <h3 id="New_Discrep_Label">Create Discrepancy</h3>
  </div>
  <%= simple_form_for @new_discrepancy, :validate => true, :url => {:controller=> 'discrepancy', :action => 'create', :device_id => @device.id} do |f| %>
  <div class='modal-body'>
    <%= f.input :system, :wrapper => :prepend, :label => false do %>
      <%= content_tag :span, 'System', :class => 'add-on input-label' %>
      <%= f.input_field :system %>
    <% end %>
    <%= f.input :description, :wrapper => :prepend, :label => false do %>
      <%= content_tag :span, 'Description', :class => 'add-on input-label' %>
      <%= f.input_field :description, :class => 'textarea' %>
    <% end %>
    <%= f.input :conditions, :wrapper => :prepend, :label => false do %>
      <%= content_tag :span, 'Condiditions', :class => 'add-on input-label' %>
      <%= f.input_field :conditions, :class => 'textarea' %>
    <% end %>
    <%= f.input :dirf, :wrapper => :prepend, :label => false do %>
      <%= content_tag :span, 'Reference', :class => 'add-on input-label' %>
      <%= f.input_field :dirf %>
    <% end %>
  </div>
  <div class='modal-footer'>
    <button type="button" class='btn', data-dismiss='modal', aria-hidden='true'>Cancel</button>
    <%= f.button :submit, :class => 'btn-primary' %>
  </div>
  <% end %>
</div>

Мой гемфайл

gem 'rails', '3.2.1'
gem 'jquery-rails'
gem 'carrierwave'
gem 'simple_form'
gem 'client_side_validations'
gem 'client_side_validations-simple_form'

модель

class Discrepancy < ActiveRecord::Base
STATUSES = ['Open', 'Closed', 'Rejected']

  belongs_to :device
  belongs_to :user
  has_many :parts
  has_many :updates

  validates :date_entered, :presence => true
  validates :status, :presence => true
  validates :description, :presence => true
  validates :system, :presence => true
  validate :close_date

  validates_inclusion_of :status, :in => STATUSES, 
    :message => "must be one of: #{STATUSES.join(', ')}"  

end

файл application.js

//= require jquery
//= require jquery_ujs
//= require rails.validations
//= require rails.validations.simple_form
//= require_tree .

Я также подтвердил, что тег script создается в html прямо под формой. Спасибо за помощь!

Ответы на вопрос(3)

Ваш ответ на вопрос