simply add wrapper_options argument to label_text to avoid warning
This commit is contained in:
parent
db8fbe94ae
commit
863adfc9e6
|
@ -31,7 +31,7 @@ module SimpleForm
|
|||
end
|
||||
end
|
||||
|
||||
def label_text
|
||||
def label_text(wrapper_options = nil)
|
||||
label_text = options[:label_text] || SimpleForm.label_text
|
||||
label_text.call(html_escape(raw_label_text), required_label_text, options[:label].present?).strip.html_safe
|
||||
end
|
||||
|
|
|
@ -12,9 +12,7 @@ module SimpleForm
|
|||
method = input.method(@namespace)
|
||||
|
||||
if method.arity == 0
|
||||
if method.name !~ /_text$/
|
||||
ActiveSupport::Deprecation.warn(SimpleForm::CUSTOM_INPUT_DEPRECATION_WARN % { name: @namespace })
|
||||
end
|
||||
ActiveSupport::Deprecation.warn(SimpleForm::CUSTOM_INPUT_DEPRECATION_WARN % { name: @namespace })
|
||||
|
||||
method.call
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue