forked from bofh/fetsite
thema validations
This commit is contained in:
@@ -10,12 +10,14 @@
|
||||
|
||||
class Themengruppe < ActiveRecord::Base
|
||||
WORD_COUNT = 50
|
||||
attr_accessible :text, :title, :picture,:priority
|
||||
attr_accessible :text, :title, :picture, :priority
|
||||
has_many :themen, class_name: 'Thema'
|
||||
has_many :fragen, through: :themen
|
||||
|
||||
mount_uploader :picture, PictureUploader
|
||||
|
||||
validates :title, :presence => true
|
||||
validates :text, :presence => true
|
||||
|
||||
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user