Sha256: d0bc487569d4a1a55e7c021747699170b5ca412afdf4d667921b096eeeaba6e7

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

class Dorsale::ApplicationController < ::ApplicationController
  include Pundit
  include Dorsale::BackUrlConcern

  after_action :verify_authorized
  after_action :verify_policy_scoped

  layout -> {
    if request.xhr?
      false
    else
      "application"
    end
  }

  def model
    raise NotImplementedError
  end

  helper_method :model

  def scope
    policy_scope(model)
  end

  helper_method :scope

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dorsale-3.3.0 app/controllers/dorsale/application_controller.rb
dorsale-3.2.0 app/controllers/dorsale/application_controller.rb