Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Keep stringish css class on numeric inputs

  • Loading branch information...
commit ed4c24b12ddea9b0d0681b4300eb26d9ce75af2c 1 parent 7f612bb
@haines haines authored
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")
Please sign in to comment.
Something went wrong with that request. Please try again.