Exception messages added #829

Merged
merged 1 commit into from Mar 25, 2012
@@ -333,7 +333,7 @@ def input_class_with_const_defined(as)
elsif Formtastic::Inputs.const_defined?(input_class_name)
standard_input_class_name(as).constantize
else
- raise Formtastic::UnknownInputError
+ raise Formtastic::UnknownInputError, "Unable to find input class #{input_class_name}"
end
end
@@ -345,7 +345,7 @@ def input_class_by_trying(as)
standard_input_class_name(as).constantize
end
rescue NameError
- raise Formtastic::UnknownInputError
+ raise Formtastic::UnknownInputError, "Unable to find input class for #{as}"
end
# :as => :string # => StringInput