docbrown/app/views/articles/index.json.jbuilder
Michael Kohl 02d23a0673
Refactor jbuilder (#7411)
* Refactor jbuilder for articles

* Refactor remaining jbuilder files

* Fix specs

* Remove content_truncated from response template JSON

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-04-24 12:49:12 +02:00

4 lines
137 B
Ruby

json.array!(@articles) do |article|
json.extract!(article, :id, :title, :body_html)
json.url article_url(article, format: :json)
end