has_accounts 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/account.rb +8 -0
- data/lib/has_accounts/version.rb +1 -1
- metadata +1 -1
data/app/models/account.rb
CHANGED
@@ -47,6 +47,14 @@ class Account < ActiveRecord::Base
|
|
47
47
|
acts_as_taggable
|
48
48
|
attr_accessible :tag_list
|
49
49
|
|
50
|
+
def self.default_tags
|
51
|
+
['invoice:debit', 'invoice:earnings', 'invoice:credit', 'invoice:costs', 'vat:credit', 'vat:debit']
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.tag_collection
|
55
|
+
(default_tags + Account.tag_counts.pluck(:name)).uniq
|
56
|
+
end
|
57
|
+
|
50
58
|
# Holder
|
51
59
|
# ======
|
52
60
|
belongs_to :holder, :polymorphic => true
|
data/lib/has_accounts/version.rb
CHANGED