Sha256: 0d64f46f77ae1ee3f80f6a3474ac9bf2689ed6ddcbd0a10798c44fbca0cc64c4

Contents?: true

Size: 478 Bytes

Versions: 58

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module Decidim
  # This concern contains the logic related to scopes included by resources.
  module ScopableResource
    extend ActiveSupport::Concern

    included do
      include Scopable

      belongs_to :scope,
                 foreign_key: "decidim_scope_id",
                 class_name: "Decidim::Scope",
                 optional: true

      delegate :scopes_enabled, to: :component
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-core-0.26.8 lib/decidim/scopable_resource.rb
decidim-core-0.27.4 lib/decidim/scopable_resource.rb
decidim-core-0.27.3 lib/decidim/scopable_resource.rb
decidim-core-0.26.7 lib/decidim/scopable_resource.rb
decidim-core-0.26.5 lib/decidim/scopable_resource.rb
decidim-core-0.27.2 lib/decidim/scopable_resource.rb
decidim-core-0.27.1 lib/decidim/scopable_resource.rb
decidim-core-0.26.4 lib/decidim/scopable_resource.rb
decidim-core-0.27.0 lib/decidim/scopable_resource.rb
decidim-core-0.26.3 lib/decidim/scopable_resource.rb
decidim-core-0.27.0.rc2 lib/decidim/scopable_resource.rb
decidim-core-0.27.0.rc1 lib/decidim/scopable_resource.rb
decidim-core-0.26.2 lib/decidim/scopable_resource.rb
decidim-core-0.26.1 lib/decidim/scopable_resource.rb
decidim-core-0.26.0 lib/decidim/scopable_resource.rb
decidim-core-0.26.0.rc2 lib/decidim/scopable_resource.rb
decidim-core-0.26.0.rc1 lib/decidim/scopable_resource.rb
decidim-core-0.25.2 lib/decidim/scopable_resource.rb
decidim-core-0.25.1 lib/decidim/scopable_resource.rb
decidim-core-0.25.0 lib/decidim/scopable_resource.rb