9 lines
299 B
Ruby
9 lines
299 B
Ruby
class UserCertification < ActiveRecord::Base
|
|
attr_accessible :certification_id, :user_id
|
|
|
|
validates_uniqueness_of :certification_id, :scope => :user_id, :message => 'already exists for this user.' # Makes sure users don't get certified twice
|
|
|
|
belongs_to :user
|
|
belongs_to :certification
|
|
end
|