Phase transitions in ionic gels