active_tools 0.0.22 → 0.0.24

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75a4a6add78459c610402d36c9ddb374dad11d53
4
- data.tar.gz: 7d5586266176767751e71dfd5532c6fb13d4df0d
3
+ metadata.gz: 21bd13e84f8b75b63644105d636dd04b98271b89
4
+ data.tar.gz: 6539213d2a0ef970392a78a3a25b9bb8079fac80
5
5
  SHA512:
6
- metadata.gz: b0a1c53338917e7e3fc7b3bb7d55347195de393ef499f7a1ade76f1e61748287d36660e6df30a03d889d7cbcdb564535539965f9cdaf724c8def50bf72d88b21
7
- data.tar.gz: bf0ff91f2aef670baffd9ed88a04cf14e30afb22df184bc522e741bcfca8143b7865871f66ecf8ac934a91b5bf92e317d834bf0bc1f7c44ae83b25ad9afcd6b5
6
+ metadata.gz: d6a2c7291783749147c3e8fb340132643141387c6078e689587119b8a49cf95f2ed26d7ecd0d55508f018ceac158b0ea5f4408c39d9f1b999cb3a5c9caf19a64
7
+ data.tar.gz: 85ace31ea4f265e09b7f71598f951cf96337cd33ab2711d120d2965f284a845514e56315653bf908e6cd69bf4c4b6fcc0989d6cd65eb342f26a6c786086b8802
@@ -69,7 +69,7 @@ module ActiveTools
69
69
  attributes(target, *@remote_attributes)
70
70
  end
71
71
 
72
- def try_update
72
+ def try_update
73
73
  if updateable_backup?
74
74
  begin
75
75
  @backup.update(template_attributes)
@@ -84,8 +84,8 @@ module ActiveTools
84
84
  end
85
85
  end
86
86
 
87
- def try_commit_existed
88
- if @template.present? && @uniq_by.any? && (existed = detect_existed)
87
+ def try_commit_existed
88
+ if @template.present? && @uniq_by.any? && (existed = detect_existed)
89
89
  self.target = existed
90
90
  if updateable_backup?
91
91
  @backup.mark_for_destruction
@@ -63,11 +63,8 @@ module ActiveTools
63
63
  self.adaptive_options[assoc_name.to_sym] = options.merge(:remote_attributes => attr_map.keys)
64
64
 
65
65
  class_eval <<-EOV
66
- before_validation do
66
+ after_validation do
67
67
  #{adapter_name}.try_nullify
68
- end
69
-
70
- #{Rails.version >= "4.1.0" ? "before_validation" : "before_save"} do
71
68
  #{adapter_name}.try_commit
72
69
  end
73
70
 
@@ -6,11 +6,12 @@ module ActiveTools
6
6
  end
7
7
 
8
8
  module OnLoadActionController
9
- def _render_template(options)
9
+ def _render_template(*args)
10
+ rendering = super
10
11
  if lookup_context.rendered_format == :js
11
- super + uniq_content_storage.render_content(Misc::DEFAULT_JS_FLOW_KEY)
12
+ rendering + uniq_content_storage.render_content(Misc::DEFAULT_JS_FLOW_KEY)
12
13
  else
13
- super
14
+ rendering
14
15
  end
15
16
  end
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveTools
2
- VERSION = "0.0.22"
2
+ VERSION = "0.0.24"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valery Kvon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails