ActionView::FormBuilder

class ActionView::FormBuilder

Parent:
Object

Public Instance Methods

date_select(method, options = {}, html_options = {}) Show source

Wraps ActionView::Helpers::DateHelper#date_select for form builders:

<%= form_for @person do |f| %>
  <%= f.date_select :birth_date %>
  <%= f.submit %>
<% end %>

Please refer to the documentation of the base helper for details.

# File actionview/lib/action_view/helpers/date_helper.rb, line 1117
def date_select(method, options = {}, html_options = {})
  @template.date_select(@object_name, method, objectify_options(options), html_options)
end
datetime_select(method, options = {}, html_options = {}) Show source

Wraps ActionView::Helpers::DateHelper#datetime_select for form builders:

<%= form_for @person do |f| %>
  <%= f.datetime_select :last_request_at %>
  <%= f.submit %>
<% end %>

Please refer to the documentation of the base helper for details.

# File actionview/lib/action_view/helpers/date_helper.rb, line 1141
def datetime_select(method, options = {}, html_options = {})
  @template.datetime_select(@object_name, method, objectify_options(options), html_options)
end
time_select(method, options = {}, html_options = {}) Show source

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.

# File actionview/lib/action_view/helpers/date_helper.rb, line 1129
def time_select(method, options = {}, html_options = {})
  @template.time_select(@object_name, method, objectify_options(options), html_options)
end

© 2004–2017 David Heinemeier Hansson
Licensed under the MIT License.

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部