(Rails3.2.12)
- bluerail/twitter-bootstrap-rails-confirm · GitHub
- Bootstrap を利用しているアプリの確認ダイアログを Bootstrap のモーダルウィンドウに置き換えるには - わからん
Gemfile
gem "therubyracer" gem "less-rails" gem 'twitter-bootstrap-rails' gem 'twitter-bootstrap-rails-confirm'
$ bundle install
app/assets/javascripts/application.js
//= require jquery //= require jquery_ujs //= require twitter/bootstrap //= require twitter/bootstrap/rails/confirm //= require_tree . // twitter-bootstrap-rails-confirm $(document).ready(function() { $.fn.twitter_bootstrap_confirmbox.defaults = { title: " ", cancel: "キャンセル", proceed: "OK", proceed_class: "btn proceed btn-info" }; });
app/assets/stylesheets/application.css
.modal { top: 30% !important; width: 280px !important; margin-left: -140px !important; } .modal-body { text-align: center; }