Sha256: dd05a76602844011aa6f58d8a6c2b474f2c86d36c5f7d3acfb73d9a45af6508b

Contents?: true

Size: 673 Bytes

Versions: 11

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true
module Decidim
  module Budgets
    module Admin
      # This controller is the abstract class from which all other controllers of
      # this engine inherit.
      #
      # Note that it inherits from `Decidim::Features::BaseController`, which
      # override its layout and provide all kinds of useful methods.
      class ApplicationController < Decidim::Admin::Features::BaseController
        helper_method :projects, :project

        def projects
          @projects ||= Project.where(feature: current_feature)
        end

        def project
          @project ||= projects.find(params[:id])
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
decidim-budgets-0.1.0 app/controllers/decidim/budgets/admin/application_controller.rb
decidim-0.1.0 decidim-budgets/app/controllers/decidim/budgets/admin/application_controller.rb
decidim-budgets-0.0.8.1 app/controllers/decidim/budgets/admin/application_controller.rb
decidim-0.0.8.1 decidim-budgets/app/controllers/decidim/budgets/admin/application_controller.rb
decidim-budgets-0.0.7 app/controllers/decidim/budgets/admin/application_controller.rb
decidim-0.0.7 decidim-budgets/app/controllers/decidim/budgets/admin/application_controller.rb
decidim-budgets-0.0.6 app/controllers/decidim/budgets/admin/application_controller.rb
decidim-0.0.6 decidim-budgets/app/controllers/decidim/budgets/admin/application_controller.rb
decidim-budgets-0.0.5 app/controllers/decidim/budgets/admin/application_controller.rb
decidim-0.0.5 decidim-budgets/app/controllers/decidim/budgets/admin/application_controller.rb
decidim-0.0.4 decidim-budgets/app/controllers/decidim/budgets/admin/application_controller.rb