Samsung Ace 2 with Cyanogenmod turns itself on when put on charger while turned off
In recent versions of CM, check the Settings->Developer options->Stay Awake (Screen will never sleep while charging) option.