forked from bofh/fetsite
change meetings
This commit is contained in:
11
app/models/fetmeeting.rb
Normal file
11
app/models/fetmeeting.rb
Normal 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
|
||||
7
app/models/fetmeetingtop.rb
Normal file
7
app/models/fetmeetingtop.rb
Normal 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
|
||||
Reference in New Issue
Block a user