Sha256: e102b0dd00cff9122345b564a092526797f62e3005ef5e8fd687752ef3464b23

Contents?: true

Size: 373 Bytes

Versions: 7

Compression:

Stored size: 373 Bytes

Contents

module DiscoApp::Concerns::UserAuthenticatedController

  extend ActiveSupport::Concern
  include ShopifyApp::LoginProtection

  included do
    before_action :shopify_user
  end

  private

    def shopify_user
      @user = DiscoApp::User.find(session[:shopify_user])
    rescue ActiveRecord::RecordNotFound
      redirect_to disco_app.new_user_session_path
    end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.17.0 app/controllers/disco_app/concerns/user_authenticated_controller.rb
disco_app-0.18.0 app/controllers/disco_app/concerns/user_authenticated_controller.rb
disco_app-0.18.2 app/controllers/disco_app/concerns/user_authenticated_controller.rb
disco_app-0.18.3 app/controllers/disco_app/concerns/user_authenticated_controller.rb
disco_app-0.18.6 app/controllers/disco_app/concerns/user_authenticated_controller.rb
disco_app-0.18.4 app/controllers/disco_app/concerns/user_authenticated_controller.rb
disco_app-0.18.1 app/controllers/disco_app/concerns/user_authenticated_controller.rb