Sha256: 6b5062effbb330775e6fd2c572e0a0c95ab2498166ba38588f1395b852c5392c

Contents?: true

Size: 462 Bytes

Versions: 44

Compression:

Stored size: 462 Bytes

Contents

require_dependency "phcpress/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.where(poststatus: 'published').order('created_at ASC')
    end

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

  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
phcpress-50.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-49.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-48.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-47.1.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-47.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-46.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-45.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-44.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-43.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-42.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-41.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-40.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-39.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-38.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-37.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-36.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-35.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-34.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-33.0.0 app/controllers/phcpress/api/v1/posts_controller.rb
phcpress-32.0.0 app/controllers/phcpress/api/v1/posts_controller.rb