forked from bofh/fetsite
Fetprofile, Gremien etc bearbeitet
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
class Fetprofile < ActiveRecord::Base
|
||||
attr_accessible :active, :desc, :fetmailalias, :nachname, :picture, :short, :vorname
|
||||
has_many :memberships
|
||||
has_many :gremien, :through=> :membership
|
||||
mount_uploader :picture, PictureUploader
|
||||
def name
|
||||
[vorname, nachname, "(",short,")"].join(" ")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
class Gremium < ActiveRecord::Base
|
||||
attr_accessible :desc, :name, :typ
|
||||
has_many :memberships
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
class Membership < ActiveRecord::Base
|
||||
attr_accessible :fetprofile_id, :gremium_id, :start, :stop, :typ
|
||||
belongs_to :fetprofile
|
||||
belongs_to :gremium
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user