app/models/plutus/amount.rb in plutus-0.13 vs app/models/plutus/amount.rb in plutus-0.14
- old
+ new
@@ -10,9 +10,11 @@
belongs_to :account, :class_name => 'Plutus::Account'
validates_presence_of :type, :amount, :entry, :account
# attr_accessible :account, :account_name, :amount, :entry
+ delegate :name, to: :account, prefix: true, allow_nil: true
+
# Assign an account by name
def account_name=(name)
self.account = Account.find_by_name!(name)
end