Notes posted by dalupus

RSS feed
May 24, 2011
2 thanks

must be first

A little gotcha I ran into.

This must be defined before you define your relationships.

ie:

class Ticket < ActiveRecord::Base
  set_table_name 'ticket'
  belongs_to :customer
  has_one :account, :through => :customer
end

if you do the relationships first it will not use the correct table name on the lookups.