* Inflections für Thema/Themen etc.
  * Korrigierte Views
This commit is contained in:
HausdorffHimself
2013-08-06 02:06:48 +02:00
parent b560940a70
commit 3be95d2ede
16 changed files with 167 additions and 21 deletions

View File

@@ -1,10 +1,9 @@
class Frage < ActiveRecord::Base
has_paper_trail
attr_accessible :text, :title
belongs_to :thema
validates :thema, :presence => true
validates :title, :prescece => true
validates :title, :presence => true
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
end

View File

@@ -1,3 +1,10 @@
class Frage < ActiveRecord::Base
has_paper_trail
attr_accessible :text, :title
belongs_to :thema
validates :thema, :presence => true
validates :title, :presence => true
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
end

View File

@@ -1,10 +1,11 @@
class Thema < ActiveRecord::Base
has_paper_trail
attr_accessible :text, :title
has_many :fragen
has_many :attachments
belongs_to :themengruppe
belongs_to :themengruppe, :foreign_key => "themengruppe_id"
validates :themengruppe, :presence => true
validates :title, :presence => true
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
end

View File

@@ -1,5 +1,11 @@
class Thema < ActiveRecord::Base
attr_accessible :text, :title
has_many :fragen
has_many :attachments
belongs_to :themengruppe
validates :themengruppe, :presence => true
validates :title, :presence => true
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
end

View File

@@ -1,8 +1,9 @@
class Themengruppe < ActiveRecord::Base
has_paper_trail
attr_accessible :text, :title
has_many :themen
has_many :fragen, through: :themen
validates :title, :presence => true
translates :title,:text, :versioning =>true, :fallbacks_for_empty_translations => true
end

View File

@@ -1,3 +1,8 @@
class Themengruppe < ActiveRecord::Base
has_paper_trail
attr_accessible :text, :title
has_many :themen
has_many :fragen, through: :themen
validates :title, :presence => true
end