parsley/app/views/recipes/index.json.jbuilder

13 lines
323 B
Plaintext
Raw Normal View History

2018-03-30 14:31:09 -05:00
2018-04-02 11:21:35 -05:00
json.cache_root! [Recipe.all, @recipes] do
2018-03-30 14:31:09 -05:00
2018-04-02 11:21:35 -05:00
json.extract! @recipes, :total_count, :total_pages, :current_page
json.page_size @recipes.limit_value
2018-03-30 14:31:09 -05:00
2018-04-02 11:21:35 -05:00
json.recipes @recipes do |r|
json.extract! r, :id, :name, :rating, :yields, :total_time, :active_time, :created_at, :updated_at
2018-03-30 14:31:09 -05:00
2018-04-02 11:21:35 -05:00
json.tags r.tag_names
end
end