Topic: Polymorphic DB Model
I've been cracking my head on this for a bit, and I'm ready to plead for help.
I'm trying to create a Polymorphic model for Effect types in my card game.
class Card < ActiveRecord::Base
has_many :effects, :through => :is_effect
class AddSubtractEffect < ActiveRecord::Base
belongs_to :is_effect, :polymorphic => true
Am I going about this the wrong way? Is it possible to load up all the different effects that apply to a card using a polymorphic active record model?
Thanks in advance,