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/hacks/edit.json.jbuilder

17 lines
373 B

# 编程内容
json.(@hack, :name, :description, :language, :difficult, :category, :time_limit, :open_or_not, :status)
# 代码
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