Sha256: ba3df436cc6fa7f1a7375f8b4d6ec4b8dd0107baab4af7b19a2ad29552cc810d
Contents?: true
Size: 391 Bytes
Versions: 39
Compression:
Stored size: 391 Bytes
Contents
class SpudMenu < ActiveRecord::Base validates :name,:presence => true validates_uniqueness_of :name, :scope => [: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 attr_protected :site_id scope :site, lambda {|sid| where(:site_id => sid)} end
Version data entries
39 entries across 39 versions & 2 rubygems