Sha256: 2a1bc334d440052392f9cb085e05a6e2fef55de0145f3fe6f5a51b784f6d6bb1

Contents?: true

Size: 632 Bytes

Versions: 23

Compression:

Stored size: 632 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # A helper to get the root path for a feature.
  module FeaturePathHelper
    # Returns the defined root path for a given feature.
    #
    # feature - the Feature we want to find the root path for.
    #
    # Returns a url.
    def main_feature_path(feature)
      EngineRouter.main_proxy(feature).root_path
    end

    # Returns the defined admin root path for a given feature.
    #
    # feature - the Feature we want to find the root path for.
    #
    # Returns a url.
    def manage_feature_path(feature)
      EngineRouter.admin_proxy(feature).root_path
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
decidim-core-0.7.4 app/helpers/decidim/feature_path_helper.rb
decidim-core-0.7.3 app/helpers/decidim/feature_path_helper.rb
decidim-core-0.7.2 app/helpers/decidim/feature_path_helper.rb
decidim-core-0.7.1 app/helpers/decidim/feature_path_helper.rb
decidim-core-0.7.0 app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.8 app/helpers/decidim/feature_path_helper.rb
decidim-0.6.8 decidim-core/app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.7 app/helpers/decidim/feature_path_helper.rb
decidim-0.6.7 decidim-core/app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.6 app/helpers/decidim/feature_path_helper.rb
decidim-0.6.6 decidim-core/app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.5 app/helpers/decidim/feature_path_helper.rb
decidim-0.6.5 decidim-core/app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.4 app/helpers/decidim/feature_path_helper.rb
decidim-0.6.4 decidim-core/app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.3 app/helpers/decidim/feature_path_helper.rb
decidim-0.6.3 decidim-core/app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.2 app/helpers/decidim/feature_path_helper.rb
decidim-0.6.2 decidim-core/app/helpers/decidim/feature_path_helper.rb
decidim-core-0.6.1 app/helpers/decidim/feature_path_helper.rb