Displaying 1 result from an estimated 1 matches for "recent_project".
2006 Apr 30
0
populating model attribute from one of many lists
...a
list of all Projects or they can choose from a list of "recent"
projects (Projects associated with Bookings dated within the past N
days). I settled upon the following as a way to present the different
lists of projects:
I added three attributes to the Booking model:
attr_accessor :recent_project, :all_project, :new_project
The view for creating new Bookings is provided two lists of Projects
(@projects and @recent_projects) which are used to create
corresponding select lists, essentially:
<%= select :booking, :recent_project, @recent_projects,
:include_blank => true %>
<...