has_accounts 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module HasAccounts
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_accounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: