Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Keep stringish css class on numeric inputs

  • Loading branch information...
commit ed4c24b12ddea9b0d0681b4300eb26d9ce75af2c 1 parent 7f612bb
Andrew Haines haines authored
2  lib/formtastic/inputs/base/numeric.rb
@@ -40,7 +40,7 @@ def in_option
40 40 end
41 41
42 42 def wrapper_html_options
43   - new_class = [super[:class], "numeric"].compact.join(" ")
  43 + new_class = [super[:class], "numeric", "stringish"].compact.join(" ")
44 44 super.merge(:class => new_class)
45 45 end
46 46
1  spec/inputs/number_input_spec.rb
@@ -27,6 +27,7 @@
27 27 it_should_have_input_wrapper_with_class(:number)
28 28 it_should_have_input_wrapper_with_class(:input)
29 29 it_should_have_input_wrapper_with_class(:numeric)
  30 + it_should_have_input_wrapper_with_class(:stringish)
30 31 it_should_have_input_wrapper_with_id("post_title_input")
31 32 it_should_have_label_with_text(/Title/)
32 33 it_should_have_label_for("post_title")
1  spec/inputs/range_input_spec.rb
@@ -20,6 +20,7 @@
20 20 it_should_have_input_wrapper_with_class(:range)
21 21 it_should_have_input_wrapper_with_class(:input)
22 22 it_should_have_input_wrapper_with_class(:numeric)
  23 + it_should_have_input_wrapper_with_class(:stringish)
23 24 it_should_have_input_wrapper_with_id("author_age_input")
24 25 it_should_have_label_with_text(/Age/)
25 26 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.