In order to correctly route the input information within this mojolicious application I am using the 'under' functionality. How come this code doesn't work but the code in the second block does for actually deleting the selected item from the database.
my $r_hostservices = $r->
under('/hosts_services:host_services_id')->
to('hosts_services#hosts_services');
$r_hostservices->
delete(':hosts_services_id')->
to('hosts#hosts_services_deletion')->
name('hosts_services_deletion');
The second (working) block is as follows
$r->delete('/hosts_services/:hosts_services_id')->
to('hosts#hosts_services_deletion')->
name('hosts_services_deletion');