Skip to content

Instantly share code, notes, and snippets.

@dayweek
Created April 6, 2016 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dayweek/1b6497854158e21ecb440e231e29563d to your computer and use it in GitHub Desktop.
Save dayweek/1b6497854158e21ecb440e231e29563d to your computer and use it in GitHub Desktop.
class Item < ApplicationRecord
belongs_to :item_set, optional: true
end
class ItemSet < ApplicationRecord
has_many :items
has_many :item_set_bonuses, class_name: ItemSetBonus
end
class ItemSetBonus < ApplicationRecord
self.table_name = "item_set_bonuses"
belongs_to :item_set
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment