five-two-nw-olivander 0.1.2.18 → 0.1.2.20

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
  SHA256:
3
- metadata.gz: 8a36c828d7544eb3e49f262fb2535f738a51e1c12d190eab8faad0d23628fe28
4
- data.tar.gz: 3c92c632d2a9684280afbc700b5fa2984b85998c24c2856babeaeba77dfe4ee8
3
+ metadata.gz: 246a0885f08a65203cd38b0cf490510eb6422850f30d488421922cdd18105086
4
+ data.tar.gz: ade950c3c647d7a5944465933c5b172d44d455da2622c5b3f63817f9721e9d2d
5
5
  SHA512:
6
- metadata.gz: eab8679d522df001fb3d21274571af6da60ed1d825b1d5f2b9fbe7e0f13f7c9c48ff7b81a7bc19d77464088ad5c962e91e6d8e51343e72cdd2aba7f78460eb0d
7
- data.tar.gz: 95283a4df656bb868b541131a1fe21aa2ba16eac4cf38280a6df61666b81f6c728015aadd0df4802c5125d046b2de246a7bdd03740bee84ae44a3f92037c1eb5
6
+ metadata.gz: 2a37201a7d720ded49bc20c89efe5fbd685f1d25ef6b834cf019b713873383c4863a85efde93308a5d3e28931459a6956985ca2d1fcbe76de458ed9fb3a56fbd
7
+ data.tar.gz: 2a34dfee3c1fdc0b3d87c333f35117b7501d556976aa6c5aad02d919803faa9ef340066a7423638f733da0fa085b5dace613f947edeac533f207df198be60d3f
@@ -26,7 +26,7 @@ module Olivander
26
26
  actions = resource.is_a?(Class) ?
27
27
  (routed_resource.unpersisted_crud_actions | routed_resource.collection_actions.select{ |x| !x.crud_action }) :
28
28
  (resource.persisted? ? (routed_resource.persisted_crud_actions | routed_resource.member_actions.select{ |x| !x.crud_action }): [])
29
- actions = actions.reject{ |a| a.sym == for_action || !can?(a.sym, resource) }
29
+ actions = actions.reject{ |a| a.sym == for_action || EffectiveDatatables.authorization_method.call(controller, resource, a.sym) }
30
30
  preferred = %i[show edit destroy]
31
31
  [].tap do |arr|
32
32
  preferred.each do |p|
@@ -1,5 +1,5 @@
1
1
  - actions.each do |a|
2
- = link_to controller: a.controller, action: a.action, method: a.verb, class: 'btn btn-tool', data: { turbo: true } do
2
+ = link_to({ controller: a.controller, action: a.action }, method: a.verb, class: 'btn btn-tool', data: { turbo: true }) do
3
3
  - icon_key = "activerecord.actions.icons.#{a.sym}"
4
4
  - if I18n.exists?(icon_key)
5
5
  %i.fa{ class: I18n.t(icon_key)}
@@ -1,3 +1,3 @@
1
1
  module Olivander
2
- VERSION = "0.1.2.18"
2
+ VERSION = "0.1.2.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: five-two-nw-olivander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.18
4
+ version: 0.1.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dennis