Answer the question
In order to leave comments, you need to log in
What are the naming conventions for VueJs (Vuex) + Rails Api?
Good afternoon.
The following question arose:
On the Vue side , through Axios, I pass an object with the someItem field to the Rails Api .
On the Rails Api side , in the database, I have in a table I have an object with the field some_item . In strong_parameters I have a method that automatically waits among incoming parameters - some_item , and receives someItem
I hope I described the essence of the problem clearly enough =)
So, maybe there is some functionality in Vue / Axios / Rails
, which allows on the fly (albeit according to pre-written rules) to bring the names of the fields to the same format?
So far, I am on the go right in the body of the Axios request, renaming the fields of the params object and passing the new variable to the request.
This is probably not the most optimal and logical option.
Thanks in advance for possible answers.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question