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

Version Path
spud_cms-1.0.2 app/models/spud_menu.rb
spud_cms-1.0.1 app/models/spud_menu.rb
spud_cms-1.0.0 app/models/spud_menu.rb
spud_cms-1.0.0.rc1.4 app/models/spud_menu.rb
spud_cms-1.0.0.rc1.3 app/models/spud_menu.rb
spud_cms-1.0.0.rc1.2 app/models/spud_menu.rb
spud_cms-1.0.0.rc1.1 app/models/spud_menu.rb
spud_cms-1.0.0.RC1 app/models/spud_menu.rb