concatenate first_name & last_name in select

I'd suggest getting that stuff out of the controller and into the model:


class Guest
   def self.choices_for_name_by_group_and_event(group_id, event_id)
     find(:all, :conditions => ['group_id = ? AND event_id = ?',
                                group_id, event_id]).
       map {|u| [,] }
   def name
     "#{first_name} #{last_name}"


@guests = Guest.choices_for_name_by_group_and_event(params[:group_id], params[:event_id])


     <%= select(:object, :method, @guests) %>

(your select call doesn't make sense unless you have a variable @first_name)

That should help you make some sense of it. The biggest help is having the logic in the model.


Rob Biedenharn