Rails アプリで Bootstrap モーダルを使用しています。ビューでモーダルを閉じたいと思います。
たとえば、Bootstrap のドキュメントには次のようなものがあります。
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
私はこれを試しました:
<%= submit_tag 'Cancel', :type => :reset, :class => "btn btn-danger", :input_html => {data-dismiss="modal" aria-hidden="true"} %>
しかし、構文エラーが発生します。
同じ手法を使用して、送信ボタンを閉じたいと思います。
jqueryで閉じることもできましたが、フォームで閉じたいです。
ありがとう!