effective_datatables 3.4.7 → 3.4.8

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: e7a74b101dbbefc858af2be72ba90a7da1c1ae83
4
- data.tar.gz: db20682940371ddaeaa38848e8f6d2ce5a2af923
3
+ metadata.gz: ea612785cbdfbc0f2c43e4eebff0b59e2c9cee16
4
+ data.tar.gz: c036efb3cd28bb6562a3840cb49f53952e1bee6a
5
5
  SHA512:
6
- metadata.gz: 05357fff6a2f3859cf8a5b54cc9f08edf4ee60528ad28ef37d147355d48bb14a77a740775356f2e76b9b30a795ffe7c76550007cc4a8c61102c80ccb3069e3bc
7
- data.tar.gz: 27ce01e01f8c9f6e593215cd8e2136ba8168b9f0662281ecfc962974a087a127cb68005d1504179cc35279d4e51ba63dc95c1e97829b829d21fd92be7f192b5b
6
+ metadata.gz: f8cedc334ad98daeff7ba4758d746379f87e05c4330ba8b19ba49b533a77df214c8252e01cc7a61020c2d0b93fbbf13a795ed5fdac10052fe729022bd270ca4c
7
+ data.tar.gz: 6046a329e04cb59c6aefba7a7de03c94c905c8e79c06a4be2960e8710d928be36a4bbbd3de5cbe05f2af8455c594162e75703c8529f346ab5a94b058448c2d86
data/README.md CHANGED
@@ -234,13 +234,15 @@ class PostsDatatable < Effective::Datatable
234
234
  aggregate :total
235
235
 
236
236
  # Uses effective_resources gem to discover the resource path and authorization actions
237
- # Puts in icons to show/edit/destroy actions, if authorized to those actions.
237
+ # Puts links to show/edit/destroy actions, if authorized to those actions.
238
238
  # Use the actions_col block to add additional actions
239
- actions_col show: false do |post|
240
- if !post.approved? && can?(:approve, Post)
241
- link_to 'Approve', approve_post_path(post) data: { method: :post, confirm: 'Really approve?'}
239
+
240
+ actions_col do |post|
241
+ render_resource_actions(resource, post, edit: false, partial: :glyphicons) do
242
+ glyphicon_to('print', print_post_path(post), title: 'Print')
242
243
  end
243
244
  end
245
+
244
246
  end
245
247
 
246
248
  end
@@ -541,6 +543,16 @@ actions_col show: false do |post|
541
543
  end
542
544
  ```
543
545
 
546
+ or
547
+
548
+ ```ruby
549
+ actions_col do |post|
550
+ render_resource_actions(resource, post, edit: false, partial: :glyphicons) do
551
+ glyphicon_to('print', print_post_path(post), title: 'Print')
552
+ end
553
+ end
554
+ ```
555
+
544
556
  The `glyphicon_to` helper is part of the [effective_resources](https://github.com/code-and-effect/effective_resources) gem, which is a dependency of this gem.
545
557
 
546
558
  ### length
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '3.4.7'.freeze
2
+ VERSION = '3.4.8'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.7
4
+ version: 3.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.7.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: sass-rails
56
+ name: sass
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="