parsley/app/views/ingredients/search.json.jbuilder

15 lines
186 B
Plaintext
Raw Normal View History

2018-09-12 09:43:50 -05:00
json.array! @ingredients do |i|
json.extract! i, :name
case i
when Recipe
json.id "R#{i.id}"
when Food
json.id "F#{i.id}"
else
json.id nil
end
end