instance method
input
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
input(record_name, method, options = {})
Returns a default input tag for the type of object returned by the method. For example, if @post has an attribute title mapped to a VARCHAR column that holds “Hello World”:
input("post", "title") # => <input id="post_title" name="post[title]" size="30" type="text" value="Hello World" />
Parameters
-
record_namereq -
methodreq -
optionsopt = {}
Source
# File actionpack/lib/action_view/helpers/active_record_helper.rb, line 21
def input(record_name, method, options = {})
InstanceTag.new(record_name, method, self).to_tag(options)
end
Defined in actionpack/lib/action_view/helpers/active_record_helper.rb line 21
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::ActiveRecordHelper