In my Rails application, I have the following model:
class Idea < ActiveRecord::Base
belongs_to :user
end
class User < ActiveRecord::Base
has_many :id
Yes, that is possible. I assume you want to use a DropDown list box for members
to select a user from User
model.
form do |f|
f.inputs do
f.input :user_id, :label => 'Member', :as => :select, :collection => User.all.map{|u| ["#{u.last_name}, #{u.first_name}", u.id]}
f.input :description
end
end