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.29.1 lib/decidim/scopable_resource.rb
decidim-core-0.28.4 lib/decidim/scopable_resource.rb
decidim-core-0.27.9 lib/decidim/scopable_resource.rb
decidim-core-0.29.0 lib/decidim/scopable_resource.rb
decidim-core-0.28.3 lib/decidim/scopable_resource.rb
decidim-core-0.27.8 lib/decidim/scopable_resource.rb
decidim-core-0.29.0.rc4 lib/decidim/scopable_resource.rb
decidim-core-0.29.0.rc3 lib/decidim/scopable_resource.rb
decidim-core-0.29.0.rc2 lib/decidim/scopable_resource.rb
decidim-core-0.29.0.rc1 lib/decidim/scopable_resource.rb
decidim-core-0.28.2 lib/decidim/scopable_resource.rb
decidim-core-0.27.7 lib/decidim/scopable_resource.rb
decidim-core-0.28.1 lib/decidim/scopable_resource.rb
decidim-core-0.27.6 lib/decidim/scopable_resource.rb
decidim-core-0.26.10 lib/decidim/scopable_resource.rb
decidim-core-0.26.9 lib/decidim/scopable_resource.rb
decidim-core-0.28.0 lib/decidim/scopable_resource.rb
decidim-core-0.27.5 lib/decidim/scopable_resource.rb
decidim-core-0.28.0.rc5 lib/decidim/scopable_resource.rb
decidim-core-0.28.0.rc4 lib/decidim/scopable_resource.rb