appointments = Visits::Appointment
.joins("LEFT OUTER JOIN places_seatables ON places_seatables.appointment_id=visits_appointments.id")
.where('checkout is null and "isActive" is true and noshow is false')
.select(visits_appointments.*,places_seatables.name as seatable_name, places_seatables.id as seatable_id')
Now you can access them as
appointment = appointments.first
appointment.seatable_name
appointment.seatable_id