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/users/question_banks/index.json.jbuilder

16 lines
622 B

6 years ago
json.count @count
json.course_list @course_lists, partial: 'users/question_banks/shared/course_list', as: :course_list
5 years ago
json.question_banks @question_banks do |question_bank|
json.id question_bank.id
json.name question_bank.name
json.is_public question_bank.is_public
json.quotes_count question_bank.quotes
json.creator_name question_bank.user.name
5 years ago
json.course_list_name question_bank.course_list&.name
5 years ago
json.updated_at question_bank.updated_at
json.solve_count @solve_count_map.fetch(question_bank.id, 0)
5 years ago
json.authorize question_bank.user_id == current_user.id || current_user.admin?
6 years ago
end