json.(@bank, :id, :name, :description, :homework_type, :is_public, :min_num, :max_num, :base_on_project, :reference_answer)
json.authorize @bank.user_id == current_user.id || current_user.admin_or_business?

json.attachments @bank_attachments do |attachment|
  json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
end

json.reference_attachments @reference_attachments do |attachment|
  json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
end