search for: com_branch_id

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

2006 Mar 15
1
Through method problems with custom foreign_keys
...PANY_BRANCH_ ID": invalid identifier: SELECT company_branches.* FROM contacts, company_branch es WHERE (company_branches.branch_id = contacts.company_branch_id AND contacts.p erson_person_id = 1) Notice that "contacts.company_branch_id" does not exist, it should be "contacts.com_branch_id" Here are the models: class Person < ActiveRecord::Base set_primary_key "person_id" has_many :contacts, :foreign_key=>"person_person_id", :class_name=>"Contact" has_many :company_branches, :through=>:cont...
2006 Mar 28
2
Fastest way of adding " " around multiline text in RADRAILS
...m(items.hours) as hours, sum(items.hours*timesheets.cost) as cost, sum(items.hours*timesheets.charge*decode(activities.chargetype,0,1,0)) as charge, sum(items.hours*decode(activities.chargetype,0,1,0)) as chargehours from timesheets, contacts, items, activities, employees, divisions where contacts.com_branch_id = 241 and employees.contact_id = contacts.CONTACT_ID and contacts.expired=0 and timesheets.id = items.timesheet and activities.id = items.activity and employees.id=timesheets.employee and divisions.id=employees.division and timesheets.status = 3 and timesheets.start_date >= ? and timesheets.sta...