Sha256: 741517c82bd8420906fe39a21b91a0536ca24bc19b13a65c0f2b203a29489e18

Contents?: true

Size: 583 Bytes

Versions: 5

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true
require "active_support/concern"

module Decidim
  # This concern groups methods and helpers related to accessing the settings
  # of a feature from a controller.
  module FeatureSettings
    extend ActiveSupport::Concern

    included do
      include NeedsParticipatoryProcess

      helper_method :feature_settings, :current_settings

      def feature_settings
        @feature_settings ||= current_feature.settings
      end

      def current_settings
        @current_settings ||= current_feature.active_step_settings
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-core-0.1.0 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.0.8.1 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.0.7 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.0.6 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.0.5 app/controllers/concerns/decidim/feature_settings.rb