has_many_polymorphic 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MDZhNTE2MzEzYjM0NWVkNTBiYTEwYmQ3OWViYjBjYmI2MzQ5MjM5NA==
5
+ data.tar.gz: !binary |-
6
+ OTBiZWEyMGU2YTY4NzMwYjdlYmY4NDc1NjdhMGFhZGRlYWRjZmIwMQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NGYzMDVkYTBlZDQxNDZmMTM4ZTI5YTUzMGI0YjZhYjg4MzZiZTQzODEyMTI5
10
+ ODk4YmNiMThjZWJhYzdjNDhmZjVhY2FhYzczMWNkOTAwNzgyNDlmMDgzZjg3
11
+ NzNhZGQyNjA1MDgyZGJlYTdjNThiMTlmNGM3NDJiN2ZlMjY5ZGU=
12
+ data.tar.gz: !binary |-
13
+ ZGU4YWFlZTNhOWZlMzU2Y2EwYTkyM2FjYjgzNWIzMzdiNDNmMTdlMTA0ZmIy
14
+ NWZlNzgyYWQ2NzYwZTgwYmI5NzBlMzdjZjY4NWYwYTlmM2YyYjJiMjdjMTcx
15
+ NjIyZTJhOGE0ZGNmNTQ2MzU2MDFiNTRkNTg1MmVjMDMxM2IyYTI=
@@ -1,7 +1,7 @@
1
1
  module RussellEdge
2
2
  module HasManyPolymorphic
3
3
  class Engine < Rails::Engine
4
- isolate_namespace HasManyPolymorphic
4
+
5
5
  DEFAULT_OPTIONS = {:models => %w()}
6
6
  @@options = HashWithIndifferentAccess.new(DEFAULT_OPTIONS)
7
7
 
@@ -70,7 +70,7 @@ module RussellEdge #:nodoc:
70
70
 
71
71
  #create the has_many relationship for each model
72
72
  options[:models].each do |model|
73
- has_many model, :through => options[:through], :source => model.to_s.singularize,
73
+ has_many model.to_sym, :through => options[:through], :source => model.to_s.singularize,
74
74
  :conditions => ["#{options[:through]}.#{name.to_s.singularize}_type = ?", model.to_s.classify], :dependent => :destroy
75
75
  end
76
76
 
@@ -122,7 +122,7 @@ module RussellEdge #:nodoc:
122
122
  options[:models].each do |model|
123
123
  model.to_s.classify.constantize.class_exec do
124
124
  has_many options[:through], :as => name.to_s.singularize, :dependent => :destroy
125
- has_many target_class_name.tableize, :through => options[:through], :dependent => :destroy
125
+ has_many target_class_name.tableize.to_sym, :through => options[:through], :dependent => :destroy
126
126
  end
127
127
  end
128
128
 
@@ -1,3 +1,3 @@
1
1
  module HasManyPolymorphic
2
- VERSION = '2.0.3' unless defined?(::HasManyPolymorphic::VERSION)
2
+ VERSION = '2.0.4' unless defined?(::HasManyPolymorphic::VERSION)
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_many_polymorphic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
5
- prerelease:
4
+ version: 2.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Russell Holmes
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-28 00:00:00.000000000 Z
11
+ date: 2013-09-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec-rails
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: simplecov
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sqlite3
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -96,26 +87,25 @@ files:
96
87
  - README.md
97
88
  homepage: https://github.com/russ1985/has_many_polymorphic
98
89
  licenses: []
90
+ metadata: {}
99
91
  post_install_message:
100
92
  rdoc_options: []
101
93
  require_paths:
102
94
  - lib
103
95
  required_ruby_version: !ruby/object:Gem::Requirement
104
- none: false
105
96
  requirements:
106
97
  - - ! '>='
107
98
  - !ruby/object:Gem::Version
108
99
  version: '0'
109
100
  required_rubygems_version: !ruby/object:Gem::Requirement
110
- none: false
111
101
  requirements:
112
102
  - - ! '>='
113
103
  - !ruby/object:Gem::Version
114
104
  version: '0'
115
105
  requirements: []
116
106
  rubyforge_project:
117
- rubygems_version: 1.8.25
107
+ rubygems_version: 2.0.7
118
108
  signing_key:
119
- specification_version: 3
109
+ specification_version: 4
120
110
  summary: Simple replacement for has_many_polymorphs
121
111
  test_files: []