date_field

date_field(object_name, method, options = {}) Instance Public methods Returns a #text_field of type âdateâ. date_field("user", "born_on") # => <input id="user_born_on" name="user[born_on]" type="date" /> The default value is generated by trying to call âto_dateâ on the object's value, which makes it behave as expected for instances of DateTime and ActiveSupport::TimeWithZone. You can still override that by passing the âvalueâ option explicitly, e.g. @user.born_on = Date.n

color_field

color_field(object_name, method, options = {}) Instance Public methods Returns a #text_field of type âcolorâ. color_field("car", "color") # => <input id="car_color" name="car[color]" type="color" value="#000000" />

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

to_partial_path

to_partial_path() Instance Public methods

to_model

to_model() Instance Public methods

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.

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.

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

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.

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",