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.
20 lines
485 B
20 lines
485 B
# 编程内容
|
|
json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not, :status, :sub_discipline_id)
|
|
|
|
# 课程
|
|
json.tag_discipline_id @hack.tag_discipline_containers.pluck(:tag_discipline_id)
|
|
|
|
# 代码
|
|
json.language @hack.language
|
|
json.code @hack.code
|
|
|
|
# 测试集
|
|
json.hack_sets do
|
|
json.array! @hack.hack_sets do |set|
|
|
json.(set, :id, :input, :output, :position)
|
|
end
|
|
end
|
|
json.user do
|
|
json.partial! 'users/user', user: current_user
|
|
end
|