Flowdock
method

select

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActionView::Helpers::FormBuilder
select(method, choices, options = {}, html_options = {}) public

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.

Show source
Register or log in to add new notes.