Macrow / rails_kindeditor

Kindeditor for Ruby on Rails
260 stars 108 forks source link

fix DEPRECATION WARNING #86

Closed yfractal closed 8 years ago

yfractal commented 8 years ago

在simple_form内使用rails_kindeditor的时候,simple_form会有如下输出。

DEPRECATION WARNING: input method now accepts a `wrapper_options` argument. The method definition without the argument is deprecated and will be removed in the next Simple Form version. Change your code from:

    def input

to

    def input(wrapper_options)

See https://github.com/plataformatec/simple_form/pull/997 for more information.

wrapper_options是用来传input的wrapper参数的。

比如我们这样定义input ba.use :input, class: 'form-control' wrapper_options就会是 {class: 'form-control'}

即使使用ba.use :input,也不会报错。