future-author-97799
08/03/2023, 5:26 AMpolicy()
is not accessible. I want to hide a field depending on : , visible: ->(resource:) { policy(resource.model).show_accounting? }
lemon-wall-20836
08/03/2023, 6:54 AMresource.authorization
. that should give you the policyfuture-author-97799
08/03/2023, 6:54 AMfuture-author-97799
08/03/2023, 6:59 AMlemon-wall-20836
08/03/2023, 7:06 AMlemon-wall-20836
08/03/2023, 7:06 AMresource.authorization.authorize_action(:index?)
future-author-97799
08/03/2023, 7:09 AMfuture-author-97799
08/03/2023, 7:09 AMfuture-author-97799
08/03/2023, 7:10 AMlemon-wall-20836
08/03/2023, 7:10 AMresource.authorization.authorize_action(:show_accounting?)
work?lemon-wall-20836
08/03/2023, 7:10 AMauthorize_action
method should forward to the pundit policyfuture-author-97799
08/03/2023, 7:19 AMfuture-author-97799
08/03/2023, 7:20 AMlemon-wall-20836
08/03/2023, 7:32 AMhttps://cdn.discordapp.com/attachments/1136530471979855894/1136562330361147462/CleanShot_2023-08-03_at_10.32.482x.png▾
lemon-wall-20836
08/03/2023, 7:33 AMlemon-wall-20836
08/03/2023, 7:33 AMlemon-wall-20836
08/03/2023, 7:33 AMhide_on: :forms
optionfuture-author-97799
08/03/2023, 8:03 AMfuture-author-97799
08/03/2023, 8:03 AMlemon-wall-20836
08/03/2023, 8:16 AMfield .... do record.some_value end
lemon-wall-20836
08/03/2023, 8:17 AMfuture-author-97799
08/07/2023, 8:53 AMlemon-wall-20836
08/07/2023, 8:54 AMfuture-author-97799
08/07/2023, 9:03 AM