-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
17 add a serializer #32
base: main
Are you sure you want to change the base?
Conversation
bundle install
existing behavior as close as possible we should choose camelCase or snake_case and stick with it
class CarSerializer | ||
include JSONAPI::Serializer | ||
|
||
set_key_transform :camel_lower |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to agree that we want to use this. That means we would need to update things like these to use camel casing.
rux-drivetracks/front/components/car/Card.vue
Lines 20 to 22 in fb1eac4
<p>initial_mileage: {{ car.initial_mileage }}</p> | |
<p>purchase_date: {{ car.purchase_date }}</p> | |
<p>purchase_vendor: {{ car.purchase_vendor }}</p> |
|
||
expect(attributes[:name]).to eq "Jim's Fiat 500" | ||
expect(attributes[:userName]).to eq user.name | ||
# expect(attributes[:image]).to be_kind_of(String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still working on getting the image serialized correctly
No description provided.