-class StorySheet < ActiveRecord::Base
+class StorySheet < Pettanr::Item
belongs_to :author
belongs_to :story
belongs_to :sheet
validates :author_id, :presence => true, :numericality => true, :existence => {:both => false}
validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
+ def self.singular
+ 'StorySheet'
+ end
+
+ def self.plural
+ 'StorySheets'
+ end
+
+ def self.owner_type
+ :author
+ end
+
def supply_default
self.story_id = nil
self.sheet_id = nil