simple_workflow 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +7 -0
- data/lib/simple_workflow/helper.rb +5 -5
- data/lib/simple_workflow/version.rb +1 -1
- metadata +4 -4
data/History.txt
CHANGED
@@ -9,18 +9,18 @@ module SimpleWorkflow::Helper
|
|
9
9
|
link_to title, with_detour(options), html_options
|
10
10
|
end
|
11
11
|
|
12
|
-
def with_detour(options)
|
13
|
-
detour_options = {:detour => params.reject { |k, v| [:detour, :return_from_detour].include? k.to_sym }}
|
12
|
+
def with_detour(options, back_options = {})
|
13
|
+
detour_options = {:detour => (params.merge(back_options)).reject { |k, v| [:detour, :return_from_detour].include? k.to_sym }}
|
14
14
|
if options.is_a? String
|
15
15
|
return options + (options =~ /\?/ ? '&' : '?') + detour_options[:detour].map{|k,v| "detour[#{k}]=#{v}"}.join('&')
|
16
16
|
else
|
17
17
|
detour_options.update(options)
|
18
18
|
if options[:layout] == false
|
19
|
-
if
|
20
|
-
detour_options[:detour].update({:action =>
|
19
|
+
if detour_options[:action] !~ /_no_layout$/
|
20
|
+
detour_options[:detour].update({:action => detour_options[:action] + '_no_layout'})
|
21
21
|
end
|
22
22
|
elsif params[:action] =~ /_no_layout$/
|
23
|
-
detour_options[:detour].update({:action =>
|
23
|
+
detour_options[:detour].update({:action => detour_options[:action][0..-11]})
|
24
24
|
end
|
25
25
|
detour_options
|
26
26
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Uwe Kubosch
|