Sha256: e0e9be4c2cbe723113627c695b7d4fd6ec9c9be95b277b4b3c255069f36e6ac0

Contents?: true

Size: 399 Bytes

Versions: 21

Compression:

Stored size: 399 Bytes

Contents

Spree::Order.class_eval do
  token_resource

  # Associates the specified user with the order and destroys any previous association with guest user if
  # necessary.
  def associate_user!(user)
    self.user = user
    self.email = user.email
    # disable validations since this can cause issues when associating an incomplete address during the address step
    save(:validate => false)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
spree_auth-1.1.5 app/models/spree/order_decorator.rb
spree_auth-1.0.7 app/models/spree/order_decorator.rb
spree_auth-1.1.4 app/models/spree/order_decorator.rb
spree_auth-1.1.3 app/models/spree/order_decorator.rb
spree_auth-1.0.6 app/models/spree/order_decorator.rb
spree_auth-1.0.5 app/models/spree/order_decorator.rb
spree_auth-1.1.2 app/models/spree/order_decorator.rb
spree_auth-1.1.2.rc1 app/models/spree/order_decorator.rb
spree_auth-1.1.1 app/models/spree/order_decorator.rb
spree_auth-1.1.0 app/models/spree/order_decorator.rb
spree_auth-1.0.4 app/models/spree/order_decorator.rb
spree_auth-1.1.0.rc2 app/models/spree/order_decorator.rb
spree_auth-1.1.0.rc1 app/models/spree/order_decorator.rb
spree_auth-1.0.3 app/models/spree/order_decorator.rb
spree_auth-1.0.2 app/models/spree/order_decorator.rb
spree_auth-1.0.1 app/models/spree/order_decorator.rb
spree_auth-1.0.0 app/models/spree/order_decorator.rb
spree_auth-1.0.0.rc4 app/models/spree/order_decorator.rb
spree_auth-1.0.0.rc3 app/models/spree/order_decorator.rb
spree_auth-1.0.0.rc2 app/models/spree/order_decorator.rb