|
|
@ -66,7 +66,7 @@ class Hack < ApplicationRecord
|
|
|
|
# 复制fork
|
|
|
|
# 复制fork
|
|
|
|
def fork
|
|
|
|
def fork
|
|
|
|
new_hack = Hack.new
|
|
|
|
new_hack = Hack.new
|
|
|
|
new_hack.attributes = self.attributes.dup.except("id", "user_id", "status", "identifier", "comments_count", "praises_count",
|
|
|
|
new_hack.attributes = self.attributes.dup.except("id", "user_id", "identifier", "comments_count", "praises_count",
|
|
|
|
"pass_num", "created_at", "updated_at", "hack_user_lastest_codes_count",
|
|
|
|
"pass_num", "created_at", "updated_at", "hack_user_lastest_codes_count",
|
|
|
|
"open_or_not", "submit_num")
|
|
|
|
"open_or_not", "submit_num")
|
|
|
|
new_hack.user_id = User.current.id
|
|
|
|
new_hack.user_id = User.current.id
|
|
|
|