Sha256: 21b1e2d1a0ed3f2f80e1ccce46769575613e895421dbc98af6b4bec41040b701

Contents?: true

Size: 531 Bytes

Versions: 10

Compression:

Stored size: 531 Bytes

Contents

# Default implementation of User.  This class is intended to be modified by extensions (ex. spree_auth_devise)
module Spree
  class LegacyUser < Spree::Base
    include UserAddress
    include UserPaymentSource
    include UserMethods

    self.table_name = 'spree_users'

    before_destroy :check_completed_orders

    attr_accessor :password
    attr_accessor :password_confirmation

    private

      def check_completed_orders
        raise Spree::Core::DestroyWithOrdersError if orders.complete.present?
      end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spree_core-3.1.5 app/models/spree/legacy_user.rb
spree_core-3.1.4 app/models/spree/legacy_user.rb
spree_core-3.1.3 app/models/spree/legacy_user.rb
spree_core-3.1.2 app/models/spree/legacy_user.rb
spree_core-3.1.1 app/models/spree/legacy_user.rb
spree_core-3.1.0 app/models/spree/legacy_user.rb
spree_core-3.1.0.rc4 app/models/spree/legacy_user.rb
spree_core-3.1.0.rc3 app/models/spree/legacy_user.rb
spree_core-3.1.0.rc2 app/models/spree/legacy_user.rb
spree_core-3.1.0.rc1 app/models/spree/legacy_user.rb