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

Version Path
tb_cms-1.0.3 app/models/spud_menu.rb
spud_cms-0.9.21 app/models/spud_menu.rb
spud_cms-0.9.20 app/models/spud_menu.rb
tb_cms-1.0.2 app/models/spud_menu.rb
tb_cms-1.0.1 app/models/spud_menu.rb
spud_cms-0.9.18 app/models/spud_menu.rb
tb_cms-1.0 app/models/spud_menu.rb
tb_cms-0.9.18 app/models/spud_menu.rb
spud_cms-0.9.17 app/models/spud_menu.rb
spud_cms-0.9.15 app/models/spud_menu.rb
spud_cms-0.9.14 app/models/spud_menu.rb
spud_cms-0.8.17 app/models/spud_menu.rb
spud_cms-0.9.13 app/models/spud_menu.rb
spud_cms-0.9.12 app/models/spud_menu.rb
spud_cms-0.9.11 app/models/spud_menu.rb
spud_cms-0.9.10 app/models/spud_menu.rb
spud_cms-0.9.9 app/models/spud_menu.rb
spud_cms-0.9.8 app/models/spud_menu.rb
spud_cms-0.9.7 app/models/spud_menu.rb
spud_cms-0.9.6 app/models/spud_menu.rb