【发布时间】:2014-01-04 14:44:37
【问题描述】:
我想在下面的选择框中同时包含经理的名字和姓氏。我怎样才能做到这一点?
表格:
<%= simple_form_for @office do |f| %>
<%= f.input :street_address %>
<%= f.input :city %>
<%= f.input :postal_code %>
<%= f.input :description, as: :text %>
<%=f.input :manager_id, collection: Manager.all, :id, :last_name, include_blank: true %>
<%= f.submit 'Add Office' %>
【问题讨论】:
标签: ruby-on-rails ruby forms associations simple-form