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====
<%= select(:first_name, :id, @guests) %>
===CONTROLLER===
@guests = Guest.find(:all, :conditions => ["group_id = ? and
event_id = ?", params[:id], params[:event]]).map { |u| [u.first_name,
u.id]}
Any ideas?
Thanks
On Nov 24, 7:28 am, Scott H. [email protected] wrote:
I want to populate a select drop down form helper with FIRST NAME + LAST
NAME.
Try asking this question on the Rails (web framework) group, not the
Ruby (general programming language that Rails happens to use) group.
On Nov 24, 2007 5:29 PM, Phrogz [email protected] wrote:
On Nov 24, 7:28 am, Scott H. [email protected] wrote:
I want to populate a select drop down form helper with FIRST NAME + LAST
NAME.
Try asking this question on the Rails (web framework) group, not the
Ruby (general programming language that Rails happens to use)
Trademark this
R.
group.