require_dependency "phcmemberspro/application_controller" module Phcmemberspro class Api::V1::ListingsController < ApplicationController # Only Responds to API Requests respond_to :json # Directory Listing API def index category = Directory::Category.find(params[:category_id]) @member_listings = category.listings.all end end end