Class: Phcpresspro::Frontend::ArticleController

Inherits:
ApplicationController show all
Defined in:
app/controllers/phcpresspro/frontend/article_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#user_for_paper_trail

Instance Method Details

#indexObject

Article Index



11
12
13
# File 'app/controllers/phcpresspro/frontend/article_controller.rb', line 11

def index
  @phcpresspro_frontend_article_list = HTTParty.get("https://#{ENV["PHC_PRESSPRO_API_DOMAIN"]}/#{ENV["PHC_PRESSPRO_API_FOLDER"]}/api/v1/posts.json")
end

#showObject

Article Show



16
17
18
# File 'app/controllers/phcpresspro/frontend/article_controller.rb', line 16

def show
  @phcpresspro_frontend_article_post = HTTParty.get("https://#{ENV["PHC_PRESSPRO_API_DOMAIN"]}/#{ENV["PHC_PRESSPRO_API_FOLDER"]}/api/v1/posts.json")
end