Skip to content
Browse files

Added exception messages for Formtastic::UnknownInputError

  • Loading branch information...
1 parent 3185056 commit ab45654fd0f9b69327bca0e1fe522d6bbe932ab7 @corny corny committed Mar 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/formtastic/helpers/input_helper.rb
View
4 lib/formtastic/helpers/input_helper.rb
@@ -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

0 comments on commit ab45654

Please sign in to comment.
Something went wrong with that request. Please try again.