Recreated photogur in rails4 to get a sense of how it works