Sha256: ebaae2aecaefec109f6c45ece772feb477b38811088f46dbf30bbb3eeff0574c

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

require_dependency "phcpresspro/application_controller"

module Phcpress
  class Api::V1::PostsController < ApplicationController

    # Only Responds to API Requests
    respond_to :json

    # Article Category API
    def index
      @article_posts = Article::Post.order('psttitle ASC')
    end

    # Article Show
    def show
      @article_post = Article::Post.find(params[:id])
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phcpress-15.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-14.1.0 app/controllers/phcpress/api/v1/posts_controller.rb