From 855386bb6a318dcc99f3ad702e08971357ea7259 Mon Sep 17 00:00:00 2001 From: Animashaun Fisayo Michael Date: Sun, 25 Feb 2024 13:48:47 +0100 Subject: [PATCH] Fix linter errors --- app/controllers/api/v1/reservations_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/v1/reservations_controller.rb b/app/controllers/api/v1/reservations_controller.rb index b23da53..4869546 100644 --- a/app/controllers/api/v1/reservations_controller.rb +++ b/app/controllers/api/v1/reservations_controller.rb @@ -8,8 +8,10 @@ def index @reservations = current_user.reservations.includes(:car, :city) render json: { - status: { code: 200, message: 'Reservations fetched.' }, - data: @reservations.map { |reservation| ReservationSerializer.new(reservation).serializable_hash[:data][:attributes] } + status: { code: 200, message: 'Reservations fetched successfully' }, + data: @reservations.map do |reservation| + ReservationSerializer.new(reservation).serializable_hash[:data][:attributes] + end }, status: :ok end