Files
fetsite/app/models/beispiel.rb
Andreas Stephanides 6d925b1b3d annotations
2013-08-23 12:01:14 +02:00

25 lines
679 B
Ruby
Executable File

# == Schema Information
#
# Table name: beispiele
#
# id :integer not null, primary key
# name :string(255)
# desc :text
# lva_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# beispieldatei :string(255)
#
class Beispiel < ActiveRecord::Base
has_paper_trail
attr_accessible :desc, :name, :lva_id, :beispieldatei, :beispieldatei_cache
belongs_to :lva
mount_uploader :beispieldatei, BeispieldateiUploader
validates :beispieldatei, :presence => true
validates :name, :presence => true
validates :lva_id, :presence => true
validates :lva, :presence => true
end