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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 246a0885f08a65203cd38b0cf490510eb6422850f30d488421922cdd18105086
|
4
|
+
data.tar.gz: ade950c3c647d7a5944465933c5b172d44d455da2622c5b3f63817f9721e9d2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 ||
|
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)}
|
data/lib/olivander/version.rb
CHANGED