json.hack do json.(@hack, :name, :difficult, :time_limit, :description, :score, :identifier) json.language @hack.language json.username @hack.user.real_name json.code @my_hack.code json.pass_count @hack.pass_num json.submit_count @hack.submit_num json.modify_code @modify end json.test_case do json.input @hack.input_test_case end json.user do json.partial! 'users/user', user: current_user json.hack_manager @hack.manager?(current_user) end