0
데이터베이스에 datamapper를 사용합니다. 나는 테이블을 가지고있다. 이다업데이트 테이블 열
class ZedTable
include DataMapper::Resource
property :id, Serial
property :label, String
property :now, Boolean, :default => false
before :save do
ZedTable.all.update(:now => false)
self.now = true
end
end
, 나는 오직 하나 개의 값이 true
했다합니다. 그러나 데이터를 저장할 때 오류가 발생합니다.
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
왜? 어떻게이 문제를 해결할 수 있습니까? 감사합니다. .