Sha256: 95de9c8568e50c82a8cd9a4f286f89053f0861abcfa18191d94ac0a8036a122d

Contents?: true

Size: 280 Bytes

Versions: 2

Compression:

Stored size: 280 Bytes

Contents

# + Spec +User+
class User < ActiveRecord::Base
  auto_increment :letter_code, scope: :account_id, initial: 'A', force: true,
    lock: true, model_scope: :with_mark

  belongs_to :account

  default_scope -> { where 'name <> ?', 'Mark' }

  scope :with_mark, -> { unscoped }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
auto_increment-1.5.2 spec/models/user.rb
auto_increment-1.5.1 spec/models/user.rb