Setup sections in model
This commit is contained in:
parent
fa9e9ff866
commit
8c05bfd523
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue