simple_workflow 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,8 +1,16 @@
1
+ == 0.4.5 2012-11-22
2
+
3
+ === Fixes
4
+
5
+ * Changed image_link_to and image_link_to_remote to take link_options instead of just post => true/false.
6
+ Use ":method => :post" for post instead of "true".
7
+
8
+
1
9
  == 0.3.5 2012-11-22
2
10
 
3
11
  === Fixes
4
12
 
5
- * Changes detour_to to accept all url forms that url_for accepts.
13
+ * Changed detour_to to accept all url forms that url_for accepts.
6
14
 
7
15
 
8
16
  == 0.3.1 2012-03-21
@@ -21,16 +21,26 @@ module SimpleWorkflow::Helper
21
21
  detour_to image_tag(image_source, image_options), url_options, link_options
22
22
  end
23
23
 
24
- def image_link_to(image_source, title, url_options, image_options = nil, post = false)
24
+ def image_link_to(image_source, title, url_options, image_options = nil, link_options = nil)
25
+ if link_options == true
26
+ link_options = {:method => :post}
27
+ elsif link_options == false
28
+ link_options = nil
29
+ end
25
30
  image_options ||= {:class => 'image-submit'}
26
31
  image_options.update :alt => title, :title => title
27
- link_to image_tag(image_source, image_options), url_options, post ? {:method => :post} : nil
32
+ link_to image_tag(image_source, image_options), url_options, link_options
28
33
  end
29
34
 
30
- def image_link_to_remote(image_source, title, link_options, image_options = nil, post = false)
35
+ def image_link_to_remote(image_source, title, link_options, image_options = nil, html_options = {})
36
+ if html_options == true
37
+ html_options = {:method => :post}
38
+ elsif html_options == false
39
+ html_options = {}
40
+ end
31
41
  image_options ||= {:class => 'image-submit'}
32
42
  image_options.update :alt => title, :title => title
33
- link_to image_tag(image_source, image_options), link_options, (post ? {:method => :post} : {}).merge(:remote => true)
43
+ link_to image_tag(image_source, image_options), link_options, html_options.merge(:remote => true)
34
44
  end
35
45
 
36
46
  def detour?
@@ -1,3 +1,3 @@
1
1
  module SimpleWorkflow
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  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: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 1
10
- version: 0.4.1
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Uwe Kubosch
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-01-04 00:00:00 Z
18
+ date: 2013-01-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails