1
0
Fork 0

Setup sections in model

This commit is contained in:
Andrew Tomaka 2013-04-11 21:38:41 -04:00
parent fa9e9ff866
commit 8c05bfd523
1 changed files with 3 additions and 0 deletions

View File

@ -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)