Sha256: 1b878e6aa2cb5f0d8c77e82defff6f37208c2a4ffa6786718586adbfa6391c03

Contents?: true

Size: 543 Bytes

Versions: 1

Compression:

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

1 entries across 1 versions & 1 rubygems

Version Path
decidim-core-0.4.3 app/controllers/concerns/decidim/feature_settings.rb