Sha256: 37dc8d01656ecbd0e7f861ef2cd1e1729e6514a4a0e79e658ccd4de43c25fc43
Contents?: true
Size: 341 Bytes
Versions: 8
Compression:
Stored size: 341 Bytes
Contents
class SpudMenu < ActiveRecord::Base validates :name,:presence => true, :uniqueness => [:site_id] has_many :spud_menu_items,:as => :parent,:dependent => :destroy has_many :spud_menu_items_combined,:class_name => "SpudMenuItem",:foreign_key => :spud_menu_id,:dependent => :destroy scope :site, lambda {|sid| where(:site_id => sid)} end
Version data entries
8 entries across 8 versions & 1 rubygems