Sha256: ff77f95f8676af05fe3b4f16b2322a95f952a2c484a0e8ea4eee54b454dc5552

Contents?: true

Size: 275 Bytes

Versions: 1

Compression:

Stored size: 275 Bytes

Contents

class Client < ActiveRecord::Base
  attr_accessible :tla, :name, :needs_tla, :tla_group

  include HasUniqueThreeLetterCode

  has_unique_three_letter_code :tla, :source => :name,
    :uniqueness => { :scope => :tla_group },
    :leave_blank => { :unless => :needs_tla }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
has_unique_three_letter_code-0.0.1 spec/support/model.rb