class Toolhound::Rental
Class to parse GitHub repository owner and name from URLs and to generate URLs
Public Instance Methods
default_joins()
click to toggle source
# File lib/toolhound-ruby/rental.rb, line 22 def default_joins arr = [] arr << "LEFT OUTER JOIN tblJobText ON (tblJobText.intJobID = tblRental.intJobID AND varLocaleID = '#{locale}')" # arr << "INNER JOIN tblLocationText ON (tblLocationText.intLocationID = tblLocation.intLocationID)" arr end
default_selects()
click to toggle source
self.table_name = :rental self.primary_key = :int_rental_id
# File lib/toolhound-ruby/rental.rb, line 11 def default_selects #{ }"SELECT tblEntity.intEntityID, tblEntity.varEntityID AS job_no, tblLocation.intLocationID, tblLocationText.varLocationName FROM tblEntity INNER JOIN tblLocation ON tblLocation.intEntityID = tblEntity.intEntityID INNER JOIN tblLocationText ON tblLocationText.intLocationID = tblLocation.intLocationID WHERE varEntityID LIKE '%10526.00%'" { rental: [ :int_rental_id, :var_rental_number, :int_from_location_id, :int_entity_id, :dte_required_date, :int_rate_sheet_id, :int_job_id, :dte_created_date, :dte_modified_date ], job_text: [{var_job: :contact_name}] } end
for_entity(id)
click to toggle source
# File lib/toolhound-ruby/rental.rb, line 30 def for_entity(id) all(where: [{int_entity_id: id}]) end