Sha256: 5f034840e716215e920e7b71f3d8a88451509a5eb87c8877165e03c18efdb183

Contents?: true

Size: 536 Bytes

Versions: 5

Compression:

Stored size: 536 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 Settings
    extend ActiveSupport::Concern

    included do
      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 & 2 rubygems

Version Path
decidim-core-0.5.1 app/controllers/concerns/decidim/settings.rb
decidim-0.5.1 decidim-core/app/controllers/concerns/decidim/settings.rb
decidim-core-0.5.0 app/controllers/concerns/decidim/settings.rb
decidim-0.5.0 decidim-core/app/controllers/concerns/decidim/settings.rb
decidim-core-0.4.4 app/controllers/concerns/decidim/settings.rb