search for: business_unit

Displaying 1 result from an estimated 1 matches for "business_unit".

2006 Feb 25
7
Help with DRY: too much code in my view
...code I have had to write to get info from multiple tables into one view. For example, for a list view of "projects" (main table), I have this code in the list.rhtml: <% odd_or_even = 0 for project in @projects @project_translations = ProjectTranslation.find(project.id) @business_unit = BusinessUnit.find(project.business_unit_id) @requestor = User.find(project.requester_user_id) @vendor_projects = VendorProject.find_by_project_translation_id(@project_translations.id) @vendor = Vendor.find(@vendor_projects.vendor_id) odd_or_even = 1 - odd_or_even %> This code I wou...