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