This commit is contained in:
Andreas Stephanides
2013-08-20 13:58:20 +02:00
13 changed files with 68 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
class Frage < ActiveRecord::Base
attr_accessible :text, :title
attr_accessible :text, :title, :thema_id
belongs_to :thema
validates :thema, :presence => true

View File

@@ -1,4 +1,5 @@
class Themengruppe < ActiveRecord::Base
WORD_COUNT = 50
attr_accessible :text, :title
has_many :themen, class_name: 'Thema'
has_many :fragen, through: :themen