forked from bofh/fetsite
gremium und studien factory und specs
This commit is contained in:
@@ -28,8 +28,11 @@ class Gremium < ActiveRecord::Base
|
||||
text :desc
|
||||
text :name
|
||||
end
|
||||
|
||||
|
||||
belongs_to :thema # Gehört zu einem Thema
|
||||
validates :name, :presence=>true
|
||||
validates :typ, :presence=>true
|
||||
validates :typ, :inclusion =>{ in: Gremium::TYPEN.keys()}
|
||||
scope :tabs, -> { where(:typ => [1,3]).order(:typ).order(:name) } # Gremien die in Tabs angezeigt werden (Alle Anderen nur in der Liste
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user