1
以下命令集成simple_form與Twitter的自舉Bootstrap3和簡單的形式
$軌摹simple_form:安裝--bootstrap
identical config/initializers/simple_form.rb
create config/initializers/simple_form_bootstrap.rb
exist config/locales
identical config/locales/simple_form.en.yml
identical lib/templates/erb/scaffold/_form.html.erb
===============================================================================
Be sure to have a copy of the Bootstrap stylesheet available on your
application, you can get it on http://twitter.github.com/bootstrap.
Inside your views, use the 'simple_form_for' with one of the Bootstrap form
classes, '.form-horizontal', '.form-inline', '.form-search' or
'.form-vertical', as the following:
= simple_form_for(@user, html: {class: 'form-horizontal' }) do |form|
===============================================================================
但我想我simple_form與引導3整合。這是什麼命令?
感謝您的回答 – Sam
因此,有額外的配置設置。自述文件xp – ahnbizcad
#2)它不是'control',而是'controls',應該更改爲'col-lg-10'。以防萬一有人在想。 – ahnbizcad