require_dependency "phcscriptcdnpro/application_controller" module Phcscriptcdnpro class Api::InformationsController < ApplicationController # Only Responds to API Requests respond_to :json # Directory Category API def index @scriptcdn_informations = Scriptcdn::Information.all respond_to do |format| format.json { render :json => @scriptcdn_informations } end end def show @scriptcdn_information = Scriptcdn::Information.find(params[:id]) end end end