app/models/plutus/account.rb in plutus-0.9.0 vs app/models/plutus/account.rb in plutus-0.10.0
- old
+ new
@@ -33,11 +33,16 @@
has_many :credit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::CreditAmount'
has_many :debit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::DebitAmount'
has_many :credit_entries, :through => :credit_amounts, :source => :entry, :class_name => 'Plutus::Entry'
has_many :debit_entries, :through => :debit_amounts, :source => :entry, :class_name => 'Plutus::Entry'
- validates_presence_of :type, :name
- validates_uniqueness_of :name
+ validates_presence_of :type
+
+ if Plutus.enable_tenancy
+ include Tenancy
+ else
+ include NoTenancy
+ end
# The credit balance for the account.
#
# @example
# >> asset.credits_balance