devblog/app/views/comments/index.json.jbuilder

5 lines
180 B
Ruby

json.array!(@comments) do |comment|
json.extract! comment, :id, :article_id, :title, :content, :rate, :created_by, :updated_by
json.url comment_url(comment, format: :json)
end