simple_tags 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module SimpleTags
2
2
  class Tagging < ActiveRecord::Base
3
3
  self.table_name = :simple_tags_taggings
4
4
  belongs_to :tag, class_name: 'SimpleTags::Tag', counter_cache: true
5
- belongs_to :taggable, polymorphic: true
5
+ belongs_to :taggable, polymorphic: true, inverse_of: :taggings
6
6
 
7
7
  validates :tag_id, uniqueness: { scope: [:taggable_type, :taggable_id] }
8
8
  validates :tag, :taggable, presence: true
@@ -20,7 +20,7 @@ module SimpleTags
20
20
  belongs_to "#{relation_name}_filter".to_sym, class_name: relation_class_name, foreign_key: 'taggable_id'
21
21
  end
22
22
 
23
- has_many :taggings, as: 'taggable', dependent: :destroy, class_name: 'SimpleTags::Tagging'
23
+ has_many :taggings, as: 'taggable', dependent: :destroy, class_name: 'SimpleTags::Tagging', inverse_of: :taggable
24
24
  has_many :tags, through: :taggings, class_name: 'SimpleTags::Tag'
25
25
  end
26
26
 
@@ -1,3 +1,3 @@
1
1
  module SimpleTags
2
- VERSION = "0.2"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-02 00:00:00.000000000 Z
12
+ date: 2012-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: -174594209294365772
146
+ hash: 2074066151020049157
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  none: false
149
149
  requirements:
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  segments:
154
154
  - 0
155
- hash: -174594209294365772
155
+ hash: 2074066151020049157
156
156
  requirements: []
157
157
  rubyforge_project:
158
158
  rubygems_version: 1.8.24