calentries -neuigkeiten calender fix

This commit is contained in:
Andreas Stephanides
2013-10-04 16:11:36 +02:00
parent 0fe92a4b48
commit 2e01fd574b
13 changed files with 63 additions and 28 deletions

View File

@@ -11,10 +11,13 @@
#
class Calendar < ActiveRecord::Base
attr_accessible :name, :public, :picture
has_and_belongs_to_many :calentries
attr_accessible :name, :public, :picture, :rubrik_id
has_many :calentries
mount_uploader :picture, PictureUploader
belongs_to :rubrik
validates :rubrik, :presence=>true
resourcify
scope :public, -> { where(:public => :true) }
scope :public_cals, -> { where(:public => :true) }
end