Sha256: 8337954dd31581fcaafb719a53a20ab2f5ac127dbc08778476b6376a98dd6378

Contents?: true

Size: 416 Bytes

Versions: 3

Compression:

Stored size: 416 Bytes

Contents

# frozen_string_literal: true

module Followability
  class Relationship < ActiveRecord::Base
    STATUSES = %i[requested blocked following].freeze

    enum status: STATUSES

    validates :status, presence: true

    belongs_to :followerable, polymorphic: true, optional: false
    belongs_to :followable, polymorphic: true, optional: false

    def self.table_name_prefix
      'followability_'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
followability-1.1.1 lib/followability/relationship.rb
followability-1.1.0 lib/followability/relationship.rb
followability-1.0.0 lib/followability/relationship.rb