early-knife-34520
05/11/2023, 3:27 PMfield :records, as: :has_many .
So, in TestResource :show I can see index of records.
I also have RecordResource with custom standalone action. If i'm calling this action from TestResource :show, I can only get instance of RecordResource without any associations.
But I want to access model instance of TestResource. Is it possible?lemon-wall-20836
05/11/2023, 3:32 PMlemon-wall-20836
05/11/2023, 3:32 PMparamslemon-wall-20836
05/11/2023, 3:32 PMruby
TestModel.find params[:id]early-knife-34520
05/11/2023, 3:33 PMlemon-wall-20836
05/11/2023, 3:33 PMlemon-wall-20836
05/11/2023, 3:33 PMmodel.testlemon-wall-20836
05/11/2023, 3:33 PMRecordResourceearly-knife-34520
05/11/2023, 3:33 PMlemon-wall-20836
05/11/2023, 3:35 PMparams object look like?lemon-wall-20836
05/11/2023, 3:35 PMearly-knife-34520
05/11/2023, 3:36 PM<ActionController::Parameters {“authenticity_token”=>“abc123", “fields”=>{“avo_resource_ids”=>“”, “avo_selected_query”=>“”, “custom_field_test”=>“”}, “button”=>“”, “controller”=>“avo/actions”, “action”=>“handle”, “resource_name”=>“records”, “action_id”=>“custom_action”} permitted: false>early-knife-34520
05/11/2023, 3:38 PMlemon-wall-20836
05/11/2023, 3:39 PMAvo::App.request.refererlemon-wall-20836
05/11/2023, 3:39 PMearly-knife-34520
05/11/2023, 3:59 PMaction accepts arguments. Idk how they are used, but maybe it's possible to pass value here to get them inside handle?lemon-wall-20836
05/11/2023, 3:59 PMlemon-wall-20836
05/11/2023, 3:59 PMearly-knife-34520
05/11/2023, 4:00 PM