1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00

Fixes after merge.

This commit is contained in:
José Valim 2011-09-03 12:17:48 +02:00
parent 8d62740fc0
commit c11f35d0e8
4 changed files with 2 additions and 17 deletions

View file

@ -131,7 +131,6 @@ module SimpleForm
components :tag => :div, :class => :input, :error_class => :field_with_errors do |b|
b.use :placeholder
b.use :maxlength
b.use :label_input
b.use :hint, :tag => :span, :class => :hint
b.use :error, :tag => :span, :class => :error

View file

@ -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

View file

@ -1,7 +1,6 @@
module SimpleForm
module Helpers
module HasErrors
private
def errors
object.errors

View file

@ -28,11 +28,11 @@ module MiscHelpers
# Temporary hack to deal with components.
def swap!(*args)
swap(*args) do
SimpleForm.deprecated_components = [ :placeholder, :maxlength, :label_input, :hint, :error ]
SimpleForm.deprecated_components = [ :placeholder, :label_input, :hint, :error ]
yield
end
ensure
SimpleForm.deprecated_components = [ :placeholder, :maxlength, :label_input, :hint, :error ]
SimpleForm.deprecated_components = [ :placeholder, :label_input, :hint, :error ]
end
def with_concat_form_for(object, &block)