class Api::ShopsController < Api::ApiController skip_before_action :authenticate def index @shops = Shop.select('id,logo,name,shop_code,address,phone_no').all # render :json => {:name => "any name"} end def show @shop = Shop.find_by_shop_code(params[:id]) end end