search for: vendor_projects

Displaying 2 results from an estimated 2 matches for "vendor_projects".

2006 Feb 25
7
Help with DRY: too much code in my view
...rojects" (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 would probably need in other views as well. For the list that customers see, for individual record views, etc. The ques...
2006 Feb 26
3
Rails Naming Conventions
...say: has_many :languages has_one :user or has_many :language has_one :user or has_many :languages has_one :users In other words, do I need to set the right plurality here, or can I just point to the exact name of the field in the DB? I''m getting lots of errors like: undefined method `vendor_projects'' for ProjectTranslation:Class And I''m not sure if that''s related or not. -- Posted via http://www.ruby-forum.com/.