yuemori/activerecord-shard_for

View on GitHub
lib/activerecord/shard_for/errors.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module ActiveRecord
  module ShardFor
    class Error < ::StandardError
    end

    # Raised when try to put new record without distkey attribute.
    class MissingDistkeyAttribute < Error
    end

    # Inherit from AR::RecordNotFound to enable to handle as AR's one.
    class RecordNotFound < ActiveRecord::RecordNotFound
    end
  end
end