thin_man 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 476da8551ed8ff3938c4ee555c1a5f61696140d1
4
- data.tar.gz: f1bdad205589a43e239d5dfed7db932532c1d2b1
3
+ metadata.gz: 7505c23309e907eb80f25e8efb2dbbce0c0b6e84
4
+ data.tar.gz: ae498426ab48b3cee758a0998b7dc4004b99f0e9
5
5
  SHA512:
6
- metadata.gz: 07baa178ecd3ba6368e23faa1fe2108117f99dd7c4c25c287aa879550fa4eb1f2e3cadea899f6e4c757c188b099acd144acc9f429947f5754434dcd63cd0acf2
7
- data.tar.gz: 847bf31b2724335c6d391c23ae2a9f5d7bdde70269473fb0411dba2c283da525b491e172bb7887d4875521f39ecab4851ee83f0ee7bff0052735582489bb3424
6
+ metadata.gz: 77f3cdb8f2e7dcfcc56a77dcc03de079e78a4b24f32024eb661ed84b8888b397e1c10267209e2fc51f20a2574f45bcb3585b8e4f1a7978e178c9baf2fea973aa
7
+ data.tar.gz: a7875b7830ade5ff848936c2bf2f1eca0cd375256f17570364c75bc3a06c65a209b7ebb5691103eeca540d0382839562fa5834e6067bcb0186ba64fbd709d4d8
@@ -1,12 +1,13 @@
1
1
  module ThinMan
2
2
  module AjaxHelper
3
- def ajax_link(name, options, html_options, target, sub_class: nil, insert_method: nil, empty_on_success: nil)
3
+ def ajax_link(name, options, html_options, target, sub_class: nil, insert_method: nil, empty_on_success: nil, http_method: nil)
4
4
  ajax_options = {
5
5
  'data-ajax-link' => true,
6
6
  'data-ajax-target' => target
7
7
  }
8
8
  ajax_options.merge!('data-sub-type' => sub_class) if sub_class.present?
9
9
  ajax_options.merge!('data-insert-method' => insert_method) if insert_method.present?
10
+ ajax_options.merge!('data-ajax-method' => http_method) if http_method.present?
10
11
  ajax_options.merge!('data-empty-on-success' => empty_on_success) if empty_on_success.present?
11
12
  link_to(name,
12
13
  options,
@@ -45,9 +46,10 @@ module ThinMan
45
46
  data_attrs
46
47
  end
47
48
 
48
- def ajax_link_attrs(target, insert_method: nil, sub_type: nil, empty_on_success: nil)
49
+ def ajax_link_attrs(target, insert_method: nil, sub_type: nil, empty_on_success: nil, http_method: nil)
49
50
  data_attrs = "data-ajax-link=true data-ajax-target=#{target}"
50
51
  data_attrs += " data-insert-method=#{insert_method}" if insert_method
52
+ data_attrs += " data-ajax-method=#{http_method}" if http_method
51
53
  data_attrs += " data-sub-type=#{sub_type}" if sub_type
52
54
  data_attrs += " data-empty-on-success=#{empty_on_success}" if empty_on_success
53
55
  data_attrs
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.5.3"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut, Adam Bialek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails