change meetings

This commit is contained in:
Sai
2014-08-27 15:22:47 +02:00
parent 3b6a964ae6
commit 585b386e7c
45 changed files with 1046 additions and 1 deletions

11
app/models/fetmeeting.rb Normal file
View File

@@ -0,0 +1,11 @@
class Fetmeeting < ActiveRecord::Base
attr_accessible :tnlist, :typ, :calentry_attributes
has_many :fetmeetingtops
validates :typ, presence: true
validates :calentry, presence: true
has_one :calentry , as: :object
accepts_nested_attributes_for :calentry
def public
true
end
end

View File

@@ -0,0 +1,7 @@
class Fetmeetingtop < ActiveRecord::Base
attr_accessible :discussion, :ersteller, :fetmeeting_id, :text, :title
belongs_to :fetmeeting
validates :fetmeeting, presence: true
validates :title, presence: true , length:{minimum: 4}
validates :ersteller, presence: true
end