当前,我正在尝试将信息馈送限制在选项选择字段中,以仅显示我选择的标准。使用下面的代码,这似乎有效
= select("schedule", :selected_players, User.where(:team_id => current_user[:team_id]) { |p| [full_name(p), p.id] }, {:include_blank => 'None', :prompt => 'Add Players to Lineup'}, :multiple => "multiple")
问题是此代码显示数组字段类型,即#<User:0xa559830>
我如何让它显示实际的用户名?