sid = params[:snapshot_id]
if sid
- Snapshot.update_all("status='U'", ["id=? or root_snapshot_id=(?)", sid, sid])
+ Snapshot.update_all("status='U'", ["id=? or root_snapshot_id=(?)", sid.to_i, sid.to_i])
flash[:notice] = message('project_history.snapshot_deleted')
end
cell_content = "<b>" + message('project_history.last_snapshot') + "</b>"
else
cell_content = button_to( message('project_history.delete_snapshot'),
- { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => [snapshot.id] },
+ { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => snapshot.id },
:class => 'action red-button',
:confirm => message('project_history.are_you_sure_delete_snapshot_x', :params => l(time, :format => :long)) )
end