You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/item_banks/index.json.jbuilder

14 lines
445 B

5 years ago
json.items @items.each do |item|
json.(item, :id, :name, :item_type, :difficulty, :public, :quotes)
5 years ago
json.analysis item.analysis
5 years ago
json.update_time item.updated_at&.strftime("%Y-%m-%d %H:%M")
json.author do
json.login item.user&.login
json.name item.user&.full_name
end
json.choices item.item_choices do |choice|
json.choice_text choice.choice_text
json.is_answer choice.is_answer
end
end
json.items_count @items_count