AlchemyCMS/alchemy-devise

View on GitHub
app/controllers/alchemy/base_controller_extension.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module Alchemy
  module BaseControllerExtension
    def self.prepended(base)
      base.before_action(:store_user_request_time)
    end

    private

    # Stores the users request time.
    def store_user_request_time
      if alchemy_user_signed_in?
        current_alchemy_user.store_request_time!
      end
    end
  end
end

Alchemy::BaseController.prepend Alchemy::BaseControllerExtension