Sha256: a1f9d930da33c92483fd6e2468bd8995b966c89f054e966efe6822c1dd6e03c7

Contents?: true

Size: 827 Bytes

Versions: 108

Compression:

Stored size: 827 Bytes

Contents

module Spree
  module CurrentUserHelpers
    def self.included(receiver)
      receiver.send :helper_method, :spree_current_user
    end

    def spree_current_user
      current_user
    end
  end

  module AuthenticationHelpers
    def self.included(receiver)
      receiver.send :helper_method, :spree_login_path
      receiver.send :helper_method, :spree_signup_path
      receiver.send :helper_method, :spree_logout_path
    end

    def spree_login_path
      main_app.login_path
    end

    def spree_signup_path
      main_app.signup_path
    end

    def spree_logout_path
      main_app.logout_path
    end
  end
end

ApplicationController.send :include, Spree::AuthenticationHelpers
ApplicationController.send :include, Spree::CurrentUserHelpers

Spree::Api::BaseController.send :include, Spree::CurrentUserHelpers

Version data entries

108 entries across 108 versions & 3 rubygems

Version Path
goca-spree-core-3.1.14.rails.5.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
goca-spree-core-3.1.15.rails.5.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
goca-spree-core-3.1.15.pre.rails.pre.5.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.14 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.13 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.12 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-2.0.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-1.4.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-1.3.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-1.2.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-1.1.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-1.0.7 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.11 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.10 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.9 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.8 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.7 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-3.1.6 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-2.0.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-1.4.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt