Sha256: feb6367636aa47d92498a43ee5c59545eb30424f6f3872cafd2ac70b45161ca7
Contents?: true
Size: 372 Bytes
Versions: 4
Compression:
Stored size: 372 Bytes
Contents
Employee.class_eval do def labor_rate_for(client) client_id ||= client.id if client.class.to_s == 'Client' client_id ||= client.to_i if client.respond_to? :to_i raise StandardError, "Invalid Client" if client_id.nil? EmployeeClientLaborRate.find(:first, :conditions => ['employee_id = ? AND client_id = ?' , self.id , client_id ] ) end end
Version data entries
4 entries across 4 versions & 1 rubygems