Module: Spree::Core::TokenResource
- Defined in:
- lib/spree/core/token_resource.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(receiver) ⇒ Object
19 20 21 |
# File 'lib/spree/core/token_resource.rb', line 19 def self.included(receiver) receiver.extend ClassMethods end |
Instance Method Details
#create_token ⇒ Object
12 13 14 15 16 17 |
# File 'lib/spree/core/token_resource.rb', line 12 def create_token = .token = token = ::SecureRandom::hex(8) .save! token end |