Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User < ActiveRecord::Base
- validates :username, :presence => true, :uniqueness => true, :length => { :minimum => 3, :maximum => 16}
- validates :password, :presence => true,
- :length => { :minimum => 6 }
- validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :on => :create
- belongs_to :subscribers
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement