form_journey 0.4.0 → 0.4.1

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: 20cc05c93f7ef7ed104cc3b64061694030c239a2
4
- data.tar.gz: b55782ff0153d610ef1b9a45534de7d4fd3dda43
3
+ metadata.gz: 8adf30ee9a53419fec8516235f10e4a944526225
4
+ data.tar.gz: a2bd09870ac330085dc90ffe33573b6ab67d4fd9
5
5
  SHA512:
6
- metadata.gz: 6b21a9f8456c7cc25251e985e4c43c7f2250bc66b174d7858142973424f4261a15288f54d4e70733ae7519ab52af2e1ae4bbf7316fb8826535da5f5d67d33762
7
- data.tar.gz: ae7328644ffc11fae4040bcbd6c963cfb524112c12520b5e2b56e25fb3845b0a118db402a1770ad25c6ff5322afd4f1ba79fe62c13b86f9650882c9799bc93f4
6
+ metadata.gz: a8e8fd9ee2897ff969062d8606c9b16226a25d77276685a200043cbf4d026c1adf050f8167ca1218bece73f1c1321c32e681c73daf570e1364781fc32b4b9431
7
+ data.tar.gz: 5179b4d3aadb4ae317ca1e39df3fd636c5b923c146adb07eaa1edcd7aba3ce6115bf54db98979d2a669d8b6a42d2384baa088f69d22b25074c15570ce7d3f8bf
@@ -17,8 +17,8 @@ module FormJourney
17
17
 
18
18
  [:current_step, :previous_step, :next_step].each do |key|
19
19
  class_eval do
20
- define_method "#{key}_path".to_sym do
21
- step_path(self.send(key))
20
+ define_method "#{key}_path".to_sym do |query_params={}|
21
+ step_path(self.send(key), query_params)
22
22
  end
23
23
  end
24
24
  end
@@ -54,8 +54,12 @@ module FormJourney
54
54
  instance_steps.delete(step_name)
55
55
  end
56
56
 
57
- def step_path(step)
58
- url_for(controller: params[:controller], action: step, journey_session_key: journey_session_key)
57
+ def step_path(step, query_params = {})
58
+ url_opts = query_params.merge(
59
+ controller: params[:controller],
60
+ action: step,
61
+ journey_session_key: journey_session_key)
62
+ url_for(url_opts)
59
63
  end
60
64
 
61
65
  def current_step
@@ -1,3 +1,3 @@
1
1
  module FormJourney
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: form_journey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Driftrock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-21 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails