Skip to content
Browse files

Keep stringish css class on numeric inputs

  • Loading branch information...
1 parent 7f612bb commit ed4c24b12ddea9b0d0681b4300eb26d9ce75af2c @haines haines committed Dec 30, 2011
Showing with 3 additions and 1 deletion.
  1. +1 −1 lib/formtastic/inputs/base/numeric.rb
  2. +1 −0 spec/inputs/number_input_spec.rb
  3. +1 −0 spec/inputs/range_input_spec.rb
View
2 lib/formtastic/inputs/base/numeric.rb
@@ -40,7 +40,7 @@ def in_option
end
def wrapper_html_options
- new_class = [super[:class], "numeric"].compact.join(" ")
+ new_class = [super[:class], "numeric", "stringish"].compact.join(" ")
super.merge(:class => new_class)
end
View
1 spec/inputs/number_input_spec.rb
@@ -27,6 +27,7 @@
it_should_have_input_wrapper_with_class(:number)
it_should_have_input_wrapper_with_class(:input)
it_should_have_input_wrapper_with_class(:numeric)
+ it_should_have_input_wrapper_with_class(:stringish)
it_should_have_input_wrapper_with_id("post_title_input")
it_should_have_label_with_text(/Title/)
it_should_have_label_for("post_title")
View
1 spec/inputs/range_input_spec.rb
@@ -20,6 +20,7 @@
it_should_have_input_wrapper_with_class(:range)
it_should_have_input_wrapper_with_class(:input)
it_should_have_input_wrapper_with_class(:numeric)
+ it_should_have_input_wrapper_with_class(:stringish)
it_should_have_input_wrapper_with_id("author_age_input")
it_should_have_label_with_text(/Age/)
it_should_have_label_for("author_age")

0 comments on commit ed4c24b

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