-class ScrollPanel < ActiveRecord::Base
+class ScrollPanel < Pettanr::Item
belongs_to :author
belongs_to :panel
belongs_to :scroll
validates :author_id, :presence => true, :numericality => true, :existence => {:both => false}
validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
- cattr_reader :singular, :plural
- @@singular = 'ScrollPanel'
- @@plural = 'ScrollPanels'
- def self.item_name
- self.singular.underscore
+ def self.singular
+ 'ScrollPanel'
end
- def item_name
- self.class.item_name
+ def self.plural
+ 'ScrollPanels'
end
- def self.path_name with_engine = false
- self.plural.underscore
- end
-
- def path_name
- self.class.path_name
+ def self.owner_type
+ :author
end
def supply_default