Blogs
This commit is contained in:
14
app/views/v1/blogs/_blog.json.jbuilder
Normal file
14
app/views/v1/blogs/_blog.json.jbuilder
Normal file
@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
json.url v1_blog_url(blog, format: :json)
|
||||
|
||||
json.extract! blog,
|
||||
:title,
|
||||
:article,
|
||||
:published_date,
|
||||
:id
|
||||
|
||||
json.author do
|
||||
json.name blog.author.display_name
|
||||
json.url v1_user_url(blog.author, format: :json)
|
||||
end
|
Reference in New Issue
Block a user