Sha256: 1c498d6e15fe2f7e4826d8fec775381a19f49381b64d7c96d05c20603cc98a63

Contents?: true

Size: 262 Bytes

Versions: 1

Compression:

Stored size: 262 Bytes

Contents

Order.class_eval do
  # Associates the specified user with the order and destroys any previous association with guest user if
  # necessary.
  def associate_user!(user)
    self.user = user
    save!
  end

  def token
    user.token if user.anonymous?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_auth-0.30.0.beta1 app/models/order_decorator.rb