-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Expected behavior
When I use smart action hook (load). I would like to execute the code that is written.
Actual behavior
When I click on my smart action a POST to /forest/actions/deny-document/hooks/load
is sent but I get an ActionController::InvalidAuthenticityToken error. This does work on a local environnent.
Failure Logs
Code
class Forest::Document
include ForestLiana::Collection
collection :Document
action 'Deny Document', type: 'single',
fields: [
{
field: 'denial_reason',
type: 'Enum',
description: 'Please select the reason of the denial',
enums: ["reason1", "reason2"],
is_required: true,
hook: 'on_denial_reason_changed'
}
],
hooks: {
load: lambda { |context|
puts "hello"
},
change: {
'on_denial_reason_changed' => lambda { |context|
puts "changed"
}
}
}
end
Context
- Package Version: 7.4.1
- Rails Version: 6.1.4.7
- Database Dialect: Postgres
- Database Version: 14.2
Metadata
Metadata
Assignees
Labels
No labels