Sha256: d8b3d26647ab75087b1b0027b67f00fe3926f1941fd4c8a95cb5ae8501bf188a

Contents?: true

Size: 244 Bytes

Versions: 45

Compression:

Stored size: 244 Bytes

Contents

if Spree.user_class
  Spree.user_class.class_eval do
    def generate_spree_api_key!
      self.spree_api_key = SecureRandom.hex(24)
      save!
    end

    def clear_spree_api_key!
      self.spree_api_key = nil
      save!
    end
  end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
spree_api-2.1.12 app/models/spree/user_decorator.rb
spree_api-2.1.11 app/models/spree/user_decorator.rb
spree_api-2.1.10 app/models/spree/user_decorator.rb
spree_api-2.0.13 app/models/spree/user_decorator.rb
spree_api-2.1.9 app/models/spree/user_decorator.rb
spree_api-2.1.8 app/models/spree/user_decorator.rb
spree_api-2.0.12 app/models/spree/user_decorator.rb
spree_api-2.1.7 app/models/spree/user_decorator.rb
spree_api-2.0.11 app/models/spree/user_decorator.rb
spree_api-2.0.10 app/models/spree/user_decorator.rb
spree_api-2.1.6 app/models/spree/user_decorator.rb
spree_api-2.2.0 app/models/spree/user_decorator.rb
spree_api-2.1.5 app/models/spree/user_decorator.rb
spree_api-2.0.9 app/models/spree/user_decorator.rb
spree_api-1.3.5 app/models/spree/user_decorator.rb
spree_api-2.1.4 app/models/spree/user_decorator.rb
spree_api-2.0.8 app/models/spree/user_decorator.rb
spree_api-2.1.3 app/models/spree/user_decorator.rb
spree_api-2.0.7 app/models/spree/user_decorator.rb
spree_api-2.1.2 app/models/spree/user_decorator.rb