Sha256: 921f91f04b1ab965b0e6e3db78e10da27d19110f6e88ba42bf62b27e42e41c4b

Contents?: true

Size: 600 Bytes

Versions: 41

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Api
    # Base controller for `decidim-api`. All other controllers inherit from this.
    class ApplicationController < ::DecidimController
      skip_before_action :verify_authenticity_token
      include NeedsOrganization
      include NeedsAuthorization
      include ImpersonateUsers

      # Overwrites `cancancan`'s method to point to the correct ability class,
      # since the gem expects the ability class to be in the root namespace.
      def current_ability_klass
        Decidim::Abilities::BaseAbility
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
decidim-api-0.11.2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.11.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.11.0.pre1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.10.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.10.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.9.3 app/controllers/decidim/api/application_controller.rb
decidim-api-0.9.2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.9.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.9.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.8.4 app/controllers/decidim/api/application_controller.rb
decidim-api-0.8.3 app/controllers/decidim/api/application_controller.rb
decidim-api-0.8.2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.8.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.8.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.7.4 app/controllers/decidim/api/application_controller.rb
decidim-api-0.7.3 app/controllers/decidim/api/application_controller.rb
decidim-api-0.7.2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.7.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.7.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.8 app/controllers/decidim/api/application_controller.rb