How do I snap objects to edges in version 2.79?
Below the 3D window click on the magnetic icon to activate



Beside the magnetic icon there are type of snap. Click on it and you can find several type of snap inside it.