DVGM/app/models/user.rb

4 lines
147 B
Ruby
Raw Normal View History

2017-10-22 18:56:44 +00:00
class User < ApplicationRecord
validates :role, inclusion: { in: ["admin", "lecturer", "student"], message: "%{value} is not a valid role" }
2017-10-22 18:56:44 +00:00
end