Fixing missing category in listing modal (#11301)

This commit is contained in:
Rafi 2020-11-06 22:59:20 +05:30 committed by GitHub
parent 97d5bc47b6
commit 47be7ea322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -6,6 +6,7 @@ class ListingsController < ApplicationController
title processed_html tag_list category id user_id slug contact_via_connect location bumped_at
originally_published_at
],
methods: %i[category],
include: {
author: { only: %i[username name], methods: %i[username profile_image_90] },
user: { only: %i[username], methods: %i[username] }

View file

@ -54,7 +54,7 @@ RSpec.describe "/listings", type: :request do
listings = JSON.parse(parsed_response.xpath("//*[@id='listings-index-container']")[0]["data-listings"])
index_keys = %w[
title processed_html tag_list id user_id slug contact_via_connect location bumped_at
title processed_html tag_list category id user_id slug contact_via_connect location bumped_at
originally_published_at author user
]