Rename input_only to input_field

This commit is contained in:
Rafael Mendonça França 2011-04-19 15:16:10 -03:00
parent cd59d47e9f
commit 671987b660
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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'