Rails simple_form 配置不生效

sforce100 · 2012年12月12日 · 2532 次阅读
config.wrappers :bootstrap, :tag => 'div', :class => 'well',
  :error_class => 'error' do |b|
  b.use :placeholder
  b.use :label
  b.wrapper :tag => 'div', :class => 'control-group new-list-item' do |ba|
    ba.use :input
    ba.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
    ba.use :hint,  :wrap_with => { :tag => 'p', :class => 'help-block' }
  end
end
# The default wrapper to be used by the FormBuilder.
config.default_wrapper = :bootstrap

但是生成的 html 完全不觉得有生效

div class="form-inputs
div class="control-group string optional
input class="string optional" id="admin_teacher_date" name="admin_teacher[date]" size="50" type="text"
暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号