Fixes after merge.
This commit is contained in:
parent
8d62740fc0
commit
c11f35d0e8
|
@ -131,7 +131,6 @@ module SimpleForm
|
||||||
|
|
||||||
components :tag => :div, :class => :input, :error_class => :field_with_errors do |b|
|
components :tag => :div, :class => :input, :error_class => :field_with_errors do |b|
|
||||||
b.use :placeholder
|
b.use :placeholder
|
||||||
b.use :maxlength
|
|
||||||
b.use :label_input
|
b.use :label_input
|
||||||
b.use :hint, :tag => :span, :class => :hint
|
b.use :hint, :tag => :span, :class => :hint
|
||||||
b.use :error, :tag => :span, :class => :error
|
b.use :error, :tag => :span, :class => :error
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
module SimpleForm
|
|
||||||
module HasErrors
|
|
||||||
def has_errors?
|
|
||||||
object && object.respond_to?(:errors) && errors.present?
|
|
||||||
end
|
|
||||||
|
|
||||||
protected
|
|
||||||
|
|
||||||
def errors
|
|
||||||
object.errors
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,7 +1,6 @@
|
||||||
module SimpleForm
|
module SimpleForm
|
||||||
module Helpers
|
module Helpers
|
||||||
module HasErrors
|
module HasErrors
|
||||||
private
|
|
||||||
|
|
||||||
def errors
|
def errors
|
||||||
object.errors
|
object.errors
|
||||||
|
|
|
@ -28,11 +28,11 @@ module MiscHelpers
|
||||||
# Temporary hack to deal with components.
|
# Temporary hack to deal with components.
|
||||||
def swap!(*args)
|
def swap!(*args)
|
||||||
swap(*args) do
|
swap(*args) do
|
||||||
SimpleForm.deprecated_components = [ :placeholder, :maxlength, :label_input, :hint, :error ]
|
SimpleForm.deprecated_components = [ :placeholder, :label_input, :hint, :error ]
|
||||||
yield
|
yield
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
SimpleForm.deprecated_components = [ :placeholder, :maxlength, :label_input, :hint, :error ]
|
SimpleForm.deprecated_components = [ :placeholder, :label_input, :hint, :error ]
|
||||||
end
|
end
|
||||||
|
|
||||||
def with_concat_form_for(object, &block)
|
def with_concat_form_for(object, &block)
|
||||||
|
|
Loading…
Reference in New Issue