rails_admin_clone 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rails_admin_clone/model_cloner.rb +1 -5
- data/lib/rails_admin_clone/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d5f4043dd3a9443e1075cd5f75e86239674f78
|
4
|
+
data.tar.gz: a06e877ca03f5aad67a40f58f5565a84848ad061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e9d311118547d8d1f374fcb166eff9c59eb3e9a3e116f2c2f4ab4f458de21cf1afc6795f014564966041134d8366297645b0b45f64990b348771108bb90b415
|
7
|
+
data.tar.gz: 3ea3fdcea36474db36398d0369e6e6f0b53c4c0e6854a700d567b04cee0de8a347d031f738efa70a991993ab57ba00a98e33cb020414975a05d6f8d39575af3c
|
data/README.md
CHANGED
@@ -124,11 +124,7 @@ module RailsAdminClone
|
|
124
124
|
|
125
125
|
# clone has_and_belongs_to_many associtations
|
126
126
|
def clone_habtm(old_object, new_object)
|
127
|
-
|
128
|
-
a.macro == :has_and_belongs_to_many || (a.macro == :has_many && a.options.keys.include?(:through))
|
129
|
-
end
|
130
|
-
|
131
|
-
associations.each do |association|
|
127
|
+
old_object.class.reflect_on_all_associations.select{|a| a.macro == :has_and_belongs_to_many}.each do |association|
|
132
128
|
method_ids = "#{association.name.to_s.singularize.to_sym}_ids"
|
133
129
|
new_object.send(:"#{method_ids}=", old_object.send(method_ids))
|
134
130
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_clone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Dal Ponte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,29 +16,29 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.2
|
19
|
+
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.2
|
26
|
+
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails_admin
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '0.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
description: Rails Admin custom action to clone
|
40
|
+
version: '0.4'
|
41
|
+
description: Rails Admin custom action to clone records
|
42
42
|
email:
|
43
43
|
- info@andreadalponte.com
|
44
44
|
executables: []
|
@@ -79,5 +79,5 @@ rubyforge_project:
|
|
79
79
|
rubygems_version: 2.2.1
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
|
-
summary: Rails Admin plugin to clone
|
82
|
+
summary: Rails Admin plugin to clone records
|
83
83
|
test_files: []
|