sort meetings

This commit is contained in:
Andreas Stephanides
2015-05-13 11:21:16 +02:00
parent 759d3f8916
commit 03c81104b2

View File

@@ -11,6 +11,7 @@ class Meeting < ActiveRecord::Base
has_one :calendar, :through=>:meetingtyp
has_one :rubrik, :through=>:meetingtyp
scope :upcomming, includes(:calentry).where("calentries.start>?",1.hour.ago)
default_scope includes(:calentry).order("calentries.start").reverse_order
accepts_nested_attributes_for :calentry
# validate :agenda, :presence=>true
# validate :protocol, :presence=>true