iknow_view_models 3.1.5 → 3.1.6

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
  SHA256:
3
- metadata.gz: 562b7d659b317d305fead028575b7e58de215322d9e363fbaeb8b97a08b087b0
4
- data.tar.gz: 4fceeeb99054d106c62659f18877fb4e0e451801902a845a85f18afdfbf9bc36
3
+ metadata.gz: 6fc1b45c59ce7be7ea1052ef27c81bf46ca556ed5d36119cf35cd3b8ecb5b07a
4
+ data.tar.gz: a667a697d8c71947884707f99d9d2bc6cb53361565cf153c8e28186a92b8e7db
5
5
  SHA512:
6
- metadata.gz: 5e3822d768f48754cf50438d443f98413c52348811b83dcec4434114a8090df3df8f7507b7840a6500050aaa458ae673926fc8d5dae49616da2d60649478f965
7
- data.tar.gz: d68b7442ef8829c8ed9951523bc7156191851ffe51b36eaaed8e96764601b0b3785a2cfa1c5b08793d0718afb574f7e0e564199f3210dc4c854249b9a70812bc
6
+ metadata.gz: c30f535e0a125a591519b1a7de0101176031afcff50d1656388cacf7bc8dc1f400c816ccefc19f7a0454fbb768911801c25ab4335ea567cab55d354f4a70aeae
7
+ data.tar.gz: d2a75cde7251e75ce400544efc02f19890edec7604131fad67ccaa8ddd37f6e51af8b72f14c3b40f33ef219c278558f550cbcabb4aad4d05fff5b0549612fc4b
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IknowViewModels
4
- VERSION = '3.1.5'
4
+ VERSION = '3.1.6'
5
5
  end
@@ -93,13 +93,15 @@ class ViewModel::TraversalContext
93
93
  end
94
94
 
95
95
  def run_callback(hook, view, **args)
96
- callbacks.each do |callback|
97
- callback.run_callback(hook, view, self, **args)
98
- end
99
-
96
+ # Run in-viewmodel callback hooks before context hooks, as they are
97
+ # permitted to alter the model.
100
98
  if view.respond_to?(hook.dsl_viewmodel_callback_method)
101
99
  view.public_send(hook.dsl_viewmodel_callback_method, hook.context_name => self, **args)
102
100
  end
101
+
102
+ callbacks.each do |callback|
103
+ callback.run_callback(hook, view, self, **args)
104
+ end
103
105
  end
104
106
 
105
107
  def root?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iknow_view_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.5
4
+ version: 3.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - iKnow Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-27 00:00:00.000000000 Z
11
+ date: 2020-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord