Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:SciMed/temptd

  • Loading branch information...
commit 281ef30c8b944449221d14fb5db3fff0cca2651a 2 parents baafa09 + 2a92953
Derick Hitchcock authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/models/event.rb
View
6 app/models/event.rb
@@ -3,9 +3,9 @@ class Event < ActiveRecord::Base
has_many :timeslots
has_many :votes
belongs_to :event_type
-
+
validates_presence_of :event_type
-
+
def to_s
"#{event_type}"
end
@@ -17,7 +17,7 @@ def starts_at
def calculate_event_details
calculate_event_time
end
-
+
def calculate_event_time
timeslot = votes.select("votes.*, count(*) AS count").
group(:timeslot_id).
Please sign in to comment.
Something went wrong with that request. Please try again.