Sha256: 32ca7ffc836ea0de022eb348726d092f92c81dbdac720246ad3c40fc7414014c

Contents?: true

Size: 270 Bytes

Versions: 2

Compression:

Stored size: 270 Bytes

Contents

class Role < ActiveRecord::Base
  has_and_belongs_to_many :users

  attr_accessible :name

  validates :name, 
    uniqueness: true,
    format: { with: /\A[a-zA-Z0-9._-]+\z/,
      :message => "Only letters, numbers, hyphens, underscores and periods are allowed"}

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hydra-role-management-0.0.2 app/models/role.rb
hydra-role-management-0.0.1 app/models/role.rb