Sha256: 3232322fcd9addcb3f37286caf672e979f7ce6f52da4a0b7db25b83a75a0972b

Contents?: true

Size: 464 Bytes

Versions: 13

Compression:

Stored size: 464 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    module Concerns
      module HasContentBlocks
        extend ActiveSupport::Concern

        included do
          helper_method :content_blocks?

          private

          def content_blocks?
            return unless Decidim.page_blocks.include?(scoped_resource.try(:slug))

            @has_content_blocks ||= available_manifests.present?
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.28.4 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.29.0 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.28.3 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.29.0.rc4 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.29.0.rc3 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.29.0.rc2 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.29.0.rc1 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.28.2 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.28.1 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.28.0 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.28.0.rc5 app/controllers/decidim/admin/concerns/has_content_blocks.rb
decidim-admin-0.28.0.rc4 app/controllers/decidim/admin/concerns/has_content_blocks.rb