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.
@@ -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: