```ruby
class CourseType < ActiveRecord::Base
  has_many :courses

  validates :name, :presence => true
end
```

Add course type uniqueness validation
user
```ruby
class CourseType < ActiveRecord::Base
  has_many :courses

  validates :name, :presence => true, :uniqueness => true
end
```
assistant