public Method

ActiveRecordHelper.input(record_name, method, options = {})

Returns a default input tag for the type of object returned by the method. For example, let’s say you have a model that has an attribute title of type VARCHAR column, and this instance holds "Hello World":

input("post", "title") =>
  <input name="post[title]" size="30" type="text" value="Hello World" />

Source Code

# File action_view/helpers/active_record_helper.rb, line 20
def input(record_name, method, options = {})
  InstanceTag.new(record_name, method, self).to_tag(options)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.