题库的引用数

dev_hss
cxt 5 years ago
parent 50b88c293f
commit 46655abd16

@ -265,6 +265,7 @@ class QuestionBanksController < ApplicationController
# exercise.update_column(:quotes, exercise.quotes+1) # exercise.update_column(:quotes, exercise.quotes+1)
# end # end
new_exercise if new_exercise.save! new_exercise if new_exercise.save!
exercise.update_column(:quotes, exercise.quotes+1)
end end
end end
@ -292,6 +293,7 @@ class QuestionBanksController < ApplicationController
# poll.update_column(:quotes, poll.quotes+1) # poll.update_column(:quotes, poll.quotes+1)
# end # end
new_poll if new_poll.save! new_poll if new_poll.save!
poll.update_column(:quotes, poll.quotes+1)
end end
end end

Loading…
Cancel
Save