Json jbuilder working with api and Working on ajax smooth refresh