Displaying 1 result from an estimated 1 matches for "missingentriesreason".
2006 Jul 26
7
Delete_all causes a deadlock on MSSQL database ???
...rough the params, looking for any starting with ''reason_''
to save
params.each {|key,reason|
if ''reason_'' == key[0,7]
pc,what = key[7,99].split ''_''
if '''' == reason
# delete this one
MissingEntriesReason.destroy_all \
"profit_centre_id = #{pc} AND which_month =
#{params[:month]} and which_year = ''#{params[:f_year]}'' and
what=''#{what}''"
# can''t use delete_all - this causes a deadlock in the
database !??!
else...