Be able to identify current record when receiving a call for default values
Actual behavior
The request parameters does not include the record id
Started POST "/forest/actions/my_action/values" for ::1 at 2018-06-10 13:32:57 +0200
Processing by Forest::OrganizationsController#my_action_values as HTML
Parameters: {"data"=>{"attributes"=>{"values"=>{ ALL_RECORD_ATTRIBUTES_EXCEPT_ID , "__meta__"=>{}}}, "type"=>"custom-action-values-requests"}, "organization"=>{"data"=>{"attributes"=>{"values"=>{ALL_RECORD_ATTRIBUTES_EXCEPT_ID, "__meta__"=>{}}}, "type"=>"custom-action-values-requests"}}}
Failure Logs
no failure just unable to do something like
organization = ::Organization.find(params.dig('data', 'attributes', 'ids')[0])
Thanks for the feedback @tvilon, the improvement is now released in production.
You don't need any liana upgrade, as the fix has been done on the Forest client app.
https://doc.forestadmin.com/developer-guide/rails.html#prefill-a-form-with-default-values
Expected behavior
Be able to identify current record when receiving a call for default values
Actual behavior
The request parameters does not include the record
id
Failure Logs
no failure just unable to do something like
organization = ::Organization.find(params.dig('data', 'attributes', 'ids')[0])
Context