Sha256: 6f8e8d34917a862c73e860252923b4be3a1fe9ad4deff783dc09d4040d289f40

Contents?: true

Size: 735 Bytes

Versions: 23

Compression:

Stored size: 735 Bytes

Contents

module <%= package_name %>
  module Concerns
    module Controller
      extend ActiveSupport::Concern
      include Plutonium::Application::Controller
      <%- if rodauth_account.present? -%>
      include Plutonium::Auth.rodauth(:<%= rodauth_account %>)
      <%- elsif public_access? -%>
      include Plutonium::Auth::Public
      <%- end -%>
      # add concerns above.

      included do
        boot <%= package_name %>
        <%- if bring_your_own_auth? -%>

        helper_method :current_user
        <%- end -%>
      end
      <%- if bring_your_own_auth? -%>

      def current_user
        raise NotImplementedError, "#{self.class}#current_user must return a non nil value"
      end
      <%- end -%>
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
plutonium-0.14.1 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.14.0 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.13.3 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.13.2 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.13.1 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.13.0 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.14 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.13 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.12 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.11 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.10 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.9 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.8 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.7 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.5 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.4 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.3 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.2 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.1 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
plutonium-0.12.0 lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt