thin_man 0.8.7 → 0.9.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: 67e883b345f220337b63177e06ed076cf7b9b2b9
4
- data.tar.gz: b739e4b7a4f93d32a06f9ea077f8d64b1abafc58
3
+ metadata.gz: 5296abc19548bc146b687a86cfd690bc20f537d3
4
+ data.tar.gz: 5286e6dc5d68995810594dbfc0d492f6b3007f62
5
5
  SHA512:
6
- metadata.gz: d067f6351bd41139cf312c8d71eb8be958a1fae5af1e30bd5cf6d2783c574a5f5a6f2cafb1c7acf338ca6456b3009b7b6fff5042dabfff76e91d4c2d9a53f15f
7
- data.tar.gz: 8aea6bad25491fcee732cd1638a6d1a808e89e5634a5db91315fb72db89b148a5fcfd8a437df4b15146a11202bb4f77c24a16539ed23f478f1871c4d368427d7
6
+ metadata.gz: 4a2c37dc34568ab96a8df53f9286ee40e870ddc1dfd3f530b47e55a4183802ae85d4127f6ac7490c540c2eb437e8039542675c43779cc807deebc646e97fea27
7
+ data.tar.gz: b5933614977dc173fa1c69792ec01bf3132a907f914992b6c0cf1acf43f8be9ebbbf371bec742d604081921f6ec0660b908e1aaf69c53e780cb00583e1c390d2
@@ -467,7 +467,12 @@ var initThinMan = function(){
467
467
  var this_class = eval('thin_man.' + thin_man.getSubClass($(this).data('sub-type'),'DeleteLink'));
468
468
  var deletion = new this_class($(this));
469
469
  });
470
-
470
+ $(document).ready(function(){
471
+ $('[data-ajax-link-now]').each(function(){
472
+ var this_class = eval('thin_man.' + thin_man.getSubClass($(this).data('sub-type'),'AjaxLinkSubmission'));
473
+ var submission = new this_class($(this));
474
+ })
475
+ })
471
476
  $(document).on('click', '[data-change-url]',function(e){
472
477
  e.preventDefault();
473
478
  new thin_man.AjaxPushState($(this))
@@ -14,6 +14,20 @@ module ThinMan
14
14
  html_options.merge(ajax_options))
15
15
  end
16
16
 
17
+ def ajax_link_now(name, options, html_options, target, sub_class: nil, insert_method: nil, empty_on_success: nil, http_method: nil)
18
+ ajax_options = {
19
+ 'data-ajax-link-now' => true,
20
+ 'data-ajax-target' => target
21
+ }
22
+ ajax_options.merge!('data-sub-type' => sub_class) if sub_class.present?
23
+ ajax_options.merge!('data-insert-method' => insert_method) if insert_method.present?
24
+ ajax_options.merge!('data-ajax-method' => http_method) if http_method.present?
25
+ ajax_options.merge!('data-empty-on-success' => empty_on_success) if empty_on_success.present?
26
+ link_to(name,
27
+ options,
28
+ html_options.merge(ajax_options))
29
+ end
30
+
17
31
  def ajax_delete(name, options, html_options, target, sub_class: nil)
18
32
  ajax_options = {
19
33
  'data-ajax-delete' => true,
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.8.7"
2
+ VERSION = "0.9.0"
3
3
  end
File without changes
@@ -0,0 +1,5 @@
1
+  (0.2ms) begin transaction
2
+ -----------------------
3
+ ThinManTest: test_truth
4
+ -----------------------
5
+  (0.0ms) rollback transaction
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.8.7
4
+ version: 0.9.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-06-17 00:00:00.000000000 Z
11
+ date: 2015-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -84,6 +84,8 @@ files:
84
84
  - test/dummy/config/locales/en.yml
85
85
  - test/dummy/config/routes.rb
86
86
  - test/dummy/config/secrets.yml
87
+ - test/dummy/db/test.sqlite3
88
+ - test/dummy/log/test.log
87
89
  - test/dummy/public/404.html
88
90
  - test/dummy/public/422.html
89
91
  - test/dummy/public/500.html
@@ -143,6 +145,8 @@ test_files:
143
145
  - test/dummy/config/routes.rb
144
146
  - test/dummy/config/secrets.yml
145
147
  - test/dummy/config.ru
148
+ - test/dummy/db/test.sqlite3
149
+ - test/dummy/log/test.log
146
150
  - test/dummy/public/404.html
147
151
  - test/dummy/public/422.html
148
152
  - test/dummy/public/500.html