label

label(method, text = nil, options = {}, &block) Instance Public methods Returns a label tag tailored for labelling an input field for a specified attribute (identified by method) on an object assigned to the template (identified by object). The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly. Additional options on the label tag can b

multipart=

multipart=(multipart) Instance Public methods

radio_button

radio_button(method, tag_value, options = {}) Instance Public methods Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked. To force the radio button to be checked pass checked: true in the options hash. You may pass HTML options there as well. # Let's say that @post.category returns "rails": radio_button("post",

select

select(method, choices = nil, options = {}, html_options = {}, &block) Instance Public methods Wraps ActionView::Helpers::FormOptionsHelper#select for form builders: <%= form_for @post do |f| %> <%= f.select :person_id, Person.all.collect { |p| [ p.name, p.id ] }, include_blank: true %> <%= f.submit %> <% end %> Please refer to the documentation of the base helper for details.

submit

submit(value=nil, options={}) Instance Public methods Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label: <%= form_for @post do |f| %> <%= f.submit %> <% end %> In the example above, if @post is a new record, it will use âCreate Postâ as submit button label, otherwise, it uses âUpdate Postâ. Those labels can be customized using I18n, under the helpers.submit key and accept

time_select

time_select(method, options = {}, html_options = {}) Instance Public methods Wraps ActionView::Helpers::DateHelper#time_select for form builders: <%= form_for @race do |f| %> <%= f.time_select :average_lap %> <%= f.submit %> <% end %> Please refer to the documentation of the base helper for details.

time_zone_select

time_zone_select(method, priority_zones = nil, options = {}, html_options = {}) Instance Public methods Wraps ActionView::Helpers::FormOptionsHelper#time_zone_select for form builders: <%= form_for @user do |f| %> <%= f.time_zone_select :time_zone, nil, include_blank: true %> <%= f.submit %> <% end %> Please refer to the documentation of the base helper for details.

to_model

to_model() Instance Public methods

to_partial_path

to_partial_path() Instance Public methods

check_box

check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0") Instance Public methods Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). This object must be an instance object (@object) and not a local object. It's intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag c