Files
fetsite/app/models/calendar.rb
2013-09-07 12:37:16 +02:00

21 lines
514 B
Ruby

# == Schema Information
#
# Table name: calendars
#
# id :integer not null, primary key
# name :string(255)
# public :boolean
# created_at :datetime not null
# updated_at :datetime not null
# picture :string(255)
#
class Calendar < ActiveRecord::Base
attr_accessible :name, :public, :picture
has_and_belongs_to_many :calentries
mount_uploader :picture, PictureUploader
belongs_to :rubrik
resourcify
scope :public, -> { where(:public => :true) }
end