Renders api data from app.rb to view, but not to javascript function call