Sha256: cd8107e86d161de7c53005abaaae469a63e58b4be8d41f135d076fd0780afefe

Contents?: true

Size: 338 Bytes

Versions: 2

Compression:

Stored size: 338 Bytes

Contents

# frozen_string_literal: true

# + 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.6.1 spec/models/user.rb
auto_increment-1.6.0 spec/models/user.rb