simple_workflow 0.4.5 → 1.0.0

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: ce2c9685c0da7bdcc2fce90f9c33aebd9157316e
4
- data.tar.gz: 670c4cfcdeed3ac6d9a8a5bc1f59cd8d9205a3f2
3
+ metadata.gz: cd8b8f126962dc2704c3cb31b5f373d8fdd41bff
4
+ data.tar.gz: c92ccb310d7758db35615a055ceaf33d25aac766
5
5
  SHA512:
6
- metadata.gz: 0bef8174a00f8f63c991373842b4d5715e6468b16b338201e9dd54c500ca2da76533797a8d9a9ca2b20f372290302389a4a9014904a2f1c71da96539ae9fd207
7
- data.tar.gz: adcc7039a8dbb3655c7c3f44bfa728872a18217cb0ff6c48746e50bd5465b92c5b94839242751edfe71a2afca9348ddbd2578b9668a7f02a21d07e4ea0ea74ac
6
+ metadata.gz: 5a6215fc2ccab9a7019915f3c3c9b49a26229e3838f928e27f76f076b95c80433413e2e2e160d78de8b68ad138e30ce639d96da6faea0643d3ddc2cfce97cb0a
7
+ data.tar.gz: 5cc0473ffafe4557baac85ab37f19ce4cfa200915afc8c106bbf9a905b15ea82831b3524b066c803701ff1ccfdef297ab8c85c9c4335235e35133c96c5b51494
@@ -5,10 +5,20 @@ module SimpleWorkflow::Helper
5
5
  :onclick => "form.action='#{url_for(options)}'"}.update(html_options)
6
6
  end
7
7
 
8
- def detour_to(title, options, html_options = nil)
9
- link_with_detour = link_to title, with_detour(options), html_options
8
+ def detour_to(title, options, html_options = nil, &block)
9
+ if block
10
+ html_options = options
11
+ options = title
12
+ link_with_detour = link_to(with_detour(options), html_options, &block)
13
+ else
14
+ link_with_detour = link_to title, with_detour(options), html_options
15
+ end
10
16
  if link_with_detour.size > 4096 # URL maximum size overflow
11
- return link_to title, options, html_options
17
+ if block
18
+ link_with_detour = link_to(options, html_options, &block)
19
+ else
20
+ link_with_detour = link_to title, with_detour(options), html_options
21
+ end
12
22
  end
13
23
  link_with_detour
14
24
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleWorkflow
2
- VERSION = '0.4.5'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uwe Kubosch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-03 00:00:00.000000000 Z
11
+ date: 2013-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -60,8 +60,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
60
  version: '0'
61
61
  requirements: []
62
62
  rubyforge_project: donv/simple_workflow
63
- rubygems_version: 2.0.3
63
+ rubygems_version: 2.0.6
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: Add simple breadcrumbs "detour" workflow to Ruby On Rails.
67
67
  test_files: []
68
+ has_rdoc: