thin_man 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thin_man/ajax_helper.rb +4 -2
- data/lib/thin_man/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7505c23309e907eb80f25e8efb2dbbce0c0b6e84
|
4
|
+
data.tar.gz: ae498426ab48b3cee758a0998b7dc4004b99f0e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77f3cdb8f2e7dcfcc56a77dcc03de079e78a4b24f32024eb661ed84b8888b397e1c10267209e2fc51f20a2574f45bcb3585b8e4f1a7978e178c9baf2fea973aa
|
7
|
+
data.tar.gz: a7875b7830ade5ff848936c2bf2f1eca0cd375256f17570364c75bc3a06c65a209b7ebb5691103eeca540d0382839562fa5834e6067bcb0186ba64fbd709d4d8
|
data/lib/thin_man/ajax_helper.rb
CHANGED
@@ -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
|
data/lib/thin_man/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|