पर बंद नहीं हो रहा है मेरे पास एक संपादन मोडल के साथ रेल अनुप्रयोग है। सबमिट कार्यक्षमता काम करता है, लेकिन करीबी बटन कुछ भी नहीं करते हैं।बूटस्ट्रैप मोडल डेटा खारिज (रेल)
Edit.js.erb:
$("#modal-window").html("<%= escape_javascript(render 'users/edit') %>");
_edit.html.erb
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<%= form_for @user,url: root_path,:method => :GET do |f|%>
<%= f.label :password %>
<%= f.password_field :password, class: 'form-control' %>
<%= f.submit "Save changes", class: "btn btn-primary" %>
<%# submit_tag 'Cancel', :type => :reset, :class => "btn btn-danger", "data-dismiss" => "modal", "aria-hidden" => "true" %>
<% end %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
दृश्य खोलता है और मोडल
<%= link_to 'Edit Password', edit_path(user.id), {:remote => true, 'data-toggle' => "modal", 'data-target' => '#modal-window'}
......
<div id="modal-window" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
घरों से लाइनों
मेरे पास रत्न स्थापित हैं। //= require bootstrap/modal
और //= require jquery
मेरी application.js में हैं
संपादित करें: पूर्ण application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require rails-ujs
//= require turbolinks
//= require_tree .
//= require bootstrap/modal
//= require jquery
आपकी application.js फ़ाइलों में कौन सी अन्य .js फ़ाइल शामिल हैं? – Rohit
@ रोहित संपादित करें – Btuman
आपको बस "// = jquery_ujs की आवश्यकता है" जोड़ने की आवश्यकता है। यदि यह भी काम नहीं करता है, तो नवीनतम jquery, jquery ui और बूटस्ट्रैप की आवश्यकता है .. – Rohit