effective_mergery 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b580838fafa8a15dc1721ef4d766aa83046cfea8
4
- data.tar.gz: 6789c91eb0cb4ae0928c13baf92a37a2eadd8416
3
+ metadata.gz: 7922291a6535bd2af2889d85cac2efbc752e91e4
4
+ data.tar.gz: 336c05b1877392c6a80745c6babcb2a1904eef21
5
5
  SHA512:
6
- metadata.gz: 7ffccb07c012a9504b798045095ff6aec833211ecf4a4943d2acf548b6aa1337ab8e475e8486894ed16af3b360a4c2fad87fad1bf2cea6a3ccd3121802174220
7
- data.tar.gz: f14348e9496c74bd329cad1f24d48288d03919a1e056ebd23fc99363bc9fa6f88da02fa110e46d2a609c49577c4563b89e6e82701a05a553f47e8b790ce86f4c
6
+ metadata.gz: b505d67ebe8cc3c508c0866b788e558c9465fa77138823ea64758cef0cc8ec1b39772b25b902790651cf9016685949505c41285d378594a68fdb3b4cbb1d7d78
7
+ data.tar.gz: d3fbb1258801e743d1dec0d3ff9a431c3372ef76db7170e1c3eb9660f12b1f3a1a3004f4a7db57a546a54d51530a2ff1637d9c69acbdc1fdd03c228ea7d8719f
@@ -31,6 +31,10 @@ module Admin
31
31
  @page_title = 'Successful Merge'
32
32
  flash[:success] = "Successfully merged #{@merge}"
33
33
 
34
+ if defined?(EffectiveLogging)
35
+ EffectiveLogger.success "Merged #{@merge}", user: (current_user rescue false), associated: @merge.target, source_id: @merge.source_id, target_id: @merge.target_id, mergable_type: @merge.type
36
+ end
37
+
34
38
  @merge.target = @merge.collection.find(@merge.target_id)
35
39
  else
36
40
  @page_title = 'New Merge'
@@ -34,7 +34,11 @@ module Effective
34
34
  end
35
35
 
36
36
  def collection
37
- @collection ||= (klass.respond_to?(:sorted) ? klass.sorted : klass.all)
37
+ @collection ||= (klass.respond_to?(:effective_mergery_collection) ? klass.effective_mergery_collection : klass.all)
38
+ end
39
+
40
+ def form_collection
41
+ @form_collection ||= (klass.respond_to?(:effective_mergery_form_collection) ? klass.effective_mergery_form_collection : collection)
38
42
  end
39
43
 
40
44
  def klass
@@ -9,11 +9,11 @@
9
9
  .row
10
10
  .col-sm-6
11
11
  = f.input :source_id, as: (defined?(EffectiveFormInputs) ? :effective_select : :select),
12
- collection: f.object.collection,
12
+ collection: f.object.form_collection,
13
13
  hint: 'This record will be destroyed'
14
14
  .col-sm-6
15
15
  = f.input :target_id, as: (defined?(EffectiveFormInputs) ? :effective_select : :select),
16
- collection: f.object.collection,
16
+ collection: f.object.form_collection,
17
17
  hint: 'This record will be kept'
18
18
 
19
19
  .row
@@ -1,3 +1,3 @@
1
1
  module EffectiveMergery
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_mergery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect