Skip to content

Instantly share code, notes, and snippets.

@mmuszynski
Last active August 29, 2015 14:20
Show Gist options
  • Save mmuszynski/d20619dc4b4372c30a86 to your computer and use it in GitHub Desktop.
Save mmuszynski/d20619dc4b4372c30a86 to your computer and use it in GitHub Desktop.
class Agent < ActiveRecord::Base
self.table_name = "agtAgents"
self.primary_key = "agentID"
#has_one :corporation, :class_name => "NPCCorporation", :foreign_key => "corporationID"
belongs_to :inv_name, :foreign_key => "agentID"
def name
return self.inv_name.to_s
end
end
class InvName < ActiveRecord::Base
self.table_name = "invNames"
self.primary_key = "itemID"
def to_s
self.itemName
end
end
agtAgents
agentID divisionID corporationID locationID level quality agentTypeID isLocator
3008416 22 1000002 60000004 1 20 2 0
invNames
itemID itemName
3008416 Antaken Kamola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment