Sha256: f2d024d17e3b94fef5f81feac95ec7c0d4c24d024d03267d4f80fd98cb8aa4c1

Contents?: true

Size: 363 Bytes

Versions: 28

Compression:

Stored size: 363 Bytes

Contents

module PushType
  module AuthenticationMethods
    extend ActiveSupport::Concern

    included do
      before_filter :authenticate_user!
    end

    protected

    def authenticate_user!
      if user_signed_in?
        super
      else
        redirect_to push_type.new_user_session_path, alert: t('devise.failure.unauthenticated')
      end
    end

  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
push_type_auth-0.8.2 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.8.1 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.8.0 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.8.0.beta.3 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.8.0.beta.2 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.8.0.beta.1 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.7.0 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.7.0.beta.1 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.6.0 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.6.0.beta.4 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.6.0.beta.3 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.6.0.beta.2 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.6.0.beta.1 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.5.3 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.5.2 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.5.1 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.5.0 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.5.0.alpha.5 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.5.0.alpha.4 app/controllers/concerns/push_type/authentication_methods.rb
push_type_auth-0.5.0.alpha.3 app/controllers/concerns/push_type/authentication_methods.rb