集合选项以简单形式选择

时间:2014-02-07 18:05:02

标签: ruby-on-rails simple-form

我有select_tag

的自定义options_from_collection_for_select
= select_tag "[recipient_tokens]", options_from_collection_for_select(User.where(:id => params[:users]), :id, :email, params[:users]), :size => "#{params[:users].size}"

但我无法使用select

中的一个值创建此simple form

1 个答案:

答案 0 :(得分:0)

= f.input "[recipient_tokens]", collection: User.where(:id => params[:users]), label_method: 'email', include_blank: false