Does Rails API and almost does JavaScript Photo Model