Displaying 1 result from an estimated 1 matches for "majic_employee".
Did you mean:
majic_employees
2006 Oct 30
2
It this possible: finder_sql-like behavior for belongs_to?
...icEmployee < ActiveRecord::Base
has_many :majic_entries
has_many :gate_clock_employees,
:finder_sql=>''select * from gate_clock_employees where
emplasci=#{number}''
end
class GateClockEmployee < ActiveRecord::Base
has_many :gate_clock_entries
belongs_to :majic_employee, :finder_sql=>''select * from majic_employees
where number=#{emplasci}''
end
gateclock=# \d gate_clock_employees
Table "public.gate_clock_employees "
Column | Type | Modifiers
-------...