some fixes commited with  binding.pry
code which works
added a photo_cache so that photo doesnt go away when page si accidentally reloaded