Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Website < Sequel::Model
- one_to_many :accounts
- def validate
- validates_unique :subdomain
- end
- end
- class Account < Sequel::Model
- many_to_one :website
- def validate
- validates_presence :email
- validates_min_length 5, :password
- validates_min_length 5, :username
- end
- end
Add Comment
Please, Sign In to add comment