educoder/app/views/gtopic_banks/show.json.jbuilder

7 lines
387 B

json.(@bank, :id, :name, :description, :is_public, :topic_type, :topic_source, :topic_property_first, :topic_property_second,
:source_unit, :topic_repeat, :province, :city)
json.authorize @bank.user_id == current_user.id || current_user.admin?
json.attachment_list @bank_attachments do |attachment|
json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
end