I am currently developing a Rails application with Vue on the frontend. I am facing an issue while making a PUT request to the server. I am trying to find a way to not include certain nested parameters like location and numbers in the PUT request. All I want to send are the agency_unique_number and name parameters in the submitAgency request. Can anyone help me solve this problem?
export default {
data: function () {
return {
agency: {
name: '',
location: {
street: ''
city:''
province:''
}
numbers: {
office_number: '',
fax_number: ''
}
agency_unique_number: ''
}
}
},
method: {
submitAgency() {
this.$axios.put('/agency.json', { agency: this.agency })
.then(response => {
})
},
}
}