Sha256: e56546d2f8f6cf41a27d2ae50ca55ee90ba084144f762551d909708906fe2786

Contents?: true

Size: 519 Bytes

Versions: 8

Compression:

Stored size: 519 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ActionDelegator
    # This controller handles user profile actions for this module
    class UserDelegationsController < ActionDelegator::ApplicationController
      include Decidim::UserProfile

      helper_method :delegations

      def index
        enforce_permission_to :read, :user, current_user: current_user
      end

      private

      def delegations
        @delegations ||= Delegation.where(grantee_id: current_user.id)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-action_delegator-0.8.1 app/controllers/decidim/action_delegator/user_delegations_controller.rb
decidim-action_delegator-0.7.2 app/controllers/decidim/action_delegator/user_delegations_controller.rb
decidim-action_delegator-0.7.1 app/controllers/decidim/action_delegator/user_delegations_controller.rb
decidim-action_delegator-0.7.0 app/controllers/decidim/action_delegator/user_delegations_controller.rb
decidim-action_delegator-0.6.0 app/controllers/decidim/action_delegator/user_delegations_controller.rb
decidim-action_delegator-0.5.0 app/controllers/decidim/action_delegator/user_delegations_controller.rb
decidim-action_delegator-0.4.1 app/controllers/decidim/action_delegator/user_delegations_controller.rb
decidim-action_delegator-0.4 app/controllers/decidim/action_delegator/user_delegations_controller.rb