Module: Spree::UserApiAuthentication
- Included in:
- UserMethods
- Defined in:
- app/models/concerns/spree/user_api_authentication.rb
Instance Method Summary collapse
Instance Method Details
#clear_spree_api_key! ⇒ Object
12 13 14 15 |
# File 'app/models/concerns/spree/user_api_authentication.rb', line 12 def clear_spree_api_key! self.spree_api_key = nil save! end |
#generate_spree_api_key ⇒ Object
8 9 10 |
# File 'app/models/concerns/spree/user_api_authentication.rb', line 8 def generate_spree_api_key self.spree_api_key = SecureRandom.hex(24) end |
#generate_spree_api_key! ⇒ Object
3 4 5 6 |
# File 'app/models/concerns/spree/user_api_authentication.rb', line 3 def generate_spree_api_key! self.spree_api_key = SecureRandom.hex(24) save! end |