S
Scott Holland
Hey,
I want to populate a select drop down form helper with FIRST NAME + LAST
NAME.
However, these are both in separate columns in the DB - how can I join
them together?
I can manage to populate it with just the first names, like this...
===VIEW====
<%= selectfirst_name, :id, @guests) %>
===CONTROLLER===
@guests = Guest.findall, :conditions => ["group_id = ? and
event_id = ?", params[:id], params[:event]]).map { |u| [u.first_name,
u.id]}
Any ideas?
Thanks
I want to populate a select drop down form helper with FIRST NAME + LAST
NAME.
However, these are both in separate columns in the DB - how can I join
them together?
I can manage to populate it with just the first names, like this...
===VIEW====
<%= selectfirst_name, :id, @guests) %>
===CONTROLLER===
@guests = Guest.findall, :conditions => ["group_id = ? and
event_id = ?", params[:id], params[:event]]).map { |u| [u.first_name,
u.id]}
Any ideas?
Thanks