Sha256: 790139b613428bacee3916471860987c3cabf7a5d415ba0e4c636c97b1fb8670

Contents?: true

Size: 329 Bytes

Versions: 1

Compression:

Stored size: 329 Bytes

Contents

require "email_validator"

class User < ActiveRecord::Base
  translates :title

  has_many :roles, dependent: :restrict_with_error

  validates :name, :length => {:in => 2..255}
  validates :name, :uniqueness => true, :presence => true
  validates :name, :format => {:with => /\A[A-z]+\Z/}
  validates :email, :email => true
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gettext_simple_rails-0.0.19 spec/dummy/app/models/user.rb