Using Rails API on the pictures show page; Fixing the links on the indexpage