3

내 응용 프로그램에 clientsidevalidations gem 및 twitter bootstrap-modal을 사용합니다. 하지만 병가는 작동하지 않습니다. 나는 몇 가지 해결책을 찾았지만ClientSideValidations가 트위터 부트 스트랩 - 모달 레일에 표시되지 않음 3.2

<form accept-charset="UTF-8" action="/admin/contents" class="new_content" data-validate="true" id="new_content" method="post" novalidate="novalidate"> 

내가 크롬의 요소를 검사 할 때 application.js

//= require bootstrap-modal 

이에

는 모달 대화

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" > 

    <%= form_for @content, :validate => true do |f| %> 
    <script>$('#new_content').validate()</script> 
    <div class="modal-header"> 
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> 
    <h3 id="myModalLabel">New Content</h3> 
    </div> 
    <div class="modal-body" style = "height:600px;overflow-y: scroll;"> 

    <div class="field"> 
    <%= f.label :name %><br /> 
    <%= f.text_field :name %> 
    </div> 
    <div class="field"> 
    <%= f.label :permalink, "Permalink" %><br /> 
    <%= f.text_field :permalink %> 
    </div> 
    <div class="field"> 
    <%= f.label :body %><br /> 
    <%= f.text_area :body, :class => "redactor", :rows => 10, :cols => 40 %> 
    </div> 
    </div> 
    <div class="modal-footer"> 
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>&nbsp;&nbsp; atau &nbsp;&nbsp; 
    <%= f.submit ("Submit"), :class => "btn btn-inverse btn-medium" %> 
    </div> 

    </div> 
    <% end %> 

</div> 

의 쇼에 대 한 요소입니다 그것은 도와주지 않았어

solution but not working to me

다른 해결책이 있습니까? 감사의

답변

0

당신은 SimpleForm과 SimpleForm의 부트 스트랩 통합을 사용해야합니다. 거기에서 Twitter 부트 스트랩을 지원하는 client_side_validations-simple_form을 사용할 수 있습니다.

+0

답을 얻으려면 브라이언이 무엇을 의미합니까? https://github.com/dockyard/client_side_validations-simple_form 그래, 시도해 볼게 .. – GeekToL

+0

네, 보석이에요. – bcardarella