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)