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

22 lines
529 B
Ruby

# == Schema Information
#
# Table name: fragen
#
# id :integer not null, primary key
# title :string(255)
# text :text
# created_at :datetime not null
# updated_at :datetime not null
# thema_id :integer
#
class Frage < ActiveRecord::Base
attr_accessible :text, :title, :thema_id
belongs_to :thema
validates :thema, :presence => true
validates :title, :presence => true
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
end