Sha256: 8eecec2c27b01d07cdf3fa6992e9ac1c1d8492e76cb8fb430daf56e7b5828d63

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

module Decidim::ComparativeStats
  class Endpoint < ApplicationRecord
    include Decidim::Traceable
    include Decidim::Loggable

    self.table_name = "decidim_comparative_stats_endpoints"

    belongs_to :organization, foreign_key: :decidim_organization_id, class_name: "Decidim::Organization"

    scope :active, -> { where(active: true) }

    def api
      @api ||= ApiFetcher.new endpoint
    end

    def self.log_presenter_class_for(_log)
      Decidim::ComparativeStats::AdminLog::EndpointPresenter
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-comparative_stats-1.1.0 app/models/decidim/comparative_stats/endpoint.rb
decidim-comparative_stats-1.0.1 app/models/decidim/comparative_stats/endpoint.rb