diff --git a/app/models/alert.rb b/app/models/alert.rb index eed0b1c..aff04bf 100644 --- a/app/models/alert.rb +++ b/app/models/alert.rb @@ -24,6 +24,9 @@ class Alert < ActiveRecord::Base # only_integer: true # } validates :semester, :presence => true + validates :sections, :presence => true + + serialize :sections scope :user_alerts, lambda { |user_id| where('Alerts.user_id = ?', user_id)