Rename input_only to input_field
This commit is contained in:
parent
cd59d47e9f
commit
671987b660
|
@ -96,10 +96,10 @@ module SimpleForm
|
|||
# == Examples
|
||||
#
|
||||
# simple_form_for @user do |f|
|
||||
# f.input_only :name
|
||||
# f.input_field :name
|
||||
# end
|
||||
#
|
||||
def input_only(attribute_name, options={})
|
||||
def input_field(attribute_name, options={})
|
||||
options.merge!({:components => [:input], :wrapper => false})
|
||||
input(attribute_name, options)
|
||||
end
|
||||
|
|
|
@ -380,7 +380,7 @@ class FormBuilderTest < ActionView::TestCase
|
|||
# ONLY THE INPUT TAG
|
||||
test "builder input_only should only render the input tag, nothing else" do
|
||||
with_concat_form_for(@user) do |f|
|
||||
f.input_only :name
|
||||
f.input_field :name
|
||||
end
|
||||
assert_select 'form > input.required.string'
|
||||
assert_no_select 'div.string'
|
||||
|
|
Loading…
Reference in New Issue