lean_tag 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lean_tag/tag.rb +1 -1
- data/lib/lean_tag/tagging.rb +1 -1
- data/lib/lean_tag/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 826bf0e70d6602d1652e50075eebb8cdc7a6954a
|
4
|
+
data.tar.gz: 1582db1e1b197c7aba0f15f3a87d67fdd4e240d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff3b6bd7dbc748e48cebdbd4cbbecff204581cbe0f3fa9be61d6e2e25a2f220c8e220e7f77c63dfedab1615541940c3fa44874fca04365a9c2aca2f19a56f908
|
7
|
+
data.tar.gz: 2ca680df07bc3377d291be9c0903b60b83ae2bef91bbda84257478c86c992c4e3f23194fe46ba9f7dc047625f502712b5e14018761b81a30ec9a0da7d43e9eee
|
data/lib/lean_tag/tag.rb
CHANGED
@@ -4,7 +4,7 @@ module LeanTag
|
|
4
4
|
self.table_name = :tags
|
5
5
|
|
6
6
|
has_many :records, through: :taggings
|
7
|
-
has_many :taggings, class_name: "LeanTag::Tagging", inverse_of: :tag
|
7
|
+
has_many :taggings, class_name: "LeanTag::Tagging", inverse_of: :tag
|
8
8
|
|
9
9
|
scope :ranked, -> { order("taggings_count DESC") }
|
10
10
|
|
data/lib/lean_tag/tagging.rb
CHANGED
@@ -4,7 +4,7 @@ module LeanTag
|
|
4
4
|
self.table_name = :taggings
|
5
5
|
|
6
6
|
belongs_to :record, polymorphic: true, inverse_of: :taggings
|
7
|
-
belongs_to :tag, class_name: "LeanTag::Tag", inverse_of: :taggings
|
7
|
+
belongs_to :tag, class_name: "LeanTag::Tag", inverse_of: :taggings, counter_cache: :taggings_count
|
8
8
|
|
9
9
|
validates :record_id, presence: true
|
10
10
|
validates :record_type, presence: true
|
data/lib/lean_tag/version.rb
CHANGED