Sha256: 371bea16b543db5e37cf1b233927e0039aa0a7188103504461df38f43ca4bb57

Contents?: true

Size: 584 Bytes

Versions: 7

Compression:

Stored size: 584 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

7 entries across 7 versions & 1 rubygems

Version Path
decidim-core-0.4.2 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.4.1 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.4.0 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.3.2 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.3.1 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.3.0 app/controllers/concerns/decidim/feature_settings.rb
decidim-core-0.2.0 app/controllers/concerns/decidim/feature_settings.rb