Class: Blog::CategoriesController

Inherits:
MainController
  • Object
show all
Defined in:
lib/nexmo_developer/app/controllers/blog/categories_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



2
3
4
5
6
7
# File 'lib/nexmo_developer/app/controllers/blog/categories_controller.rb', line 2

def show
  data = BlogpostParser.fetch_all_published
  attributes = CategoryParser.fetch_category(params[:slug])

  @category_with_all_blogposts = Blog::Category.new(attributes).build_n_blogposts_by_category(data)
end