mirror of
https://github.com/heartcombo/simple_form.git
synced 2022-11-09 12:19:26 -05:00
Add .input as class to wrapper tag
This commit is contained in:
parent
ae32faf6eb
commit
55fd32c8a9
3 changed files with 4 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
* enhancements
|
* enhancements
|
||||||
* Added support to presence validation to check if attribute is required or not (by github.com/gcirne)
|
* Added support to presence validation to check if attribute is required or not (by github.com/gcirne)
|
||||||
|
* Add .input as class to wrapper tag
|
||||||
|
|
||||||
== 1.1.3
|
== 1.1.3
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ module SimpleForm
|
||||||
end
|
end
|
||||||
|
|
||||||
def wrapper_html_options
|
def wrapper_html_options
|
||||||
html_options_for(:wrapper, input_type, required_class)
|
html_options_for(:wrapper, "input", input_type, required_class)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -267,10 +267,10 @@ class FormBuilderTest < ActionView::TestCase
|
||||||
test 'builder wrapping tag adds default css classes' do
|
test 'builder wrapping tag adds default css classes' do
|
||||||
swap SimpleForm, :wrapper_tag => :p do
|
swap SimpleForm, :wrapper_tag => :p do
|
||||||
with_form_for @user, :name
|
with_form_for @user, :name
|
||||||
assert_select 'form p.required.string'
|
assert_select 'form p.input.required.string'
|
||||||
|
|
||||||
with_form_for @user, :age, :required => false
|
with_form_for @user, :age, :required => false
|
||||||
assert_select 'form p.optional.integer'
|
assert_select 'form p.input.optional.integer'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue