Israel 's military says it targeted Palestinian militants in the area after they fired two rockets at the Israeli city of Ashkelon .