forked from bofh/fetsite
gremien tabs
This commit is contained in:
@@ -12,13 +12,14 @@
|
||||
#
|
||||
|
||||
class Gremium < ActiveRecord::Base
|
||||
TYPEN={1=>"offiziell", 2=>"offiziell-temporaer", 3 => "inoffiziell",4=>"inoffiziell-tempo"}
|
||||
TYPEN={1=>"offiziell", 2=>"offiziell-temporär", 3 => "inoffiziell",4=>"inoffiziell-tempo"}
|
||||
TAPS_TYPEN={1=>true,2=>false,3=>true,4=>false}
|
||||
GESCHLECHT={0=>"saechlich", 1 => "maennlich", 2 => "weiblich"}
|
||||
ART2FALL={0=>"des", 1=>"des",2=>"der"}
|
||||
attr_accessible :desc, :name, :typ, :geschlecht,:thema_id
|
||||
has_many :memberships
|
||||
belongs_to :thema
|
||||
scope :tabs, -> { where(:typ => [1,2]) }
|
||||
scope :tabs, -> { where(:typ => [1,3]).order(:typ).order(:name) }
|
||||
|
||||
def fall2
|
||||
Gremium::ART2FALL[self.geschlecht.to_i].to_s+" "+ self.name.to_s+ ((self.geschlecht.to_i==1||self.geschlecht.to_i==0)? "s":"")
|
||||
|
||||
Reference in New Issue
Block a user