I am working on ROR app . The app view contain ajax and jquery code :

```
jQuery.ajax({
  data:     'val=' + val,
  dataType: 'script',
  type:     'post',
  url:      "/portfolio/update"
});

```

The update action contain this code:

```
def update
  j = params[:val]

  # Buisness logic code
  redirect_to root_url, notice: "update done"
end

```

current View and Root url is same - Portfolio/show
Now the button on view (which is root\_url only)is doing the business logic fine , but the page is not getting refreshed , Whereas other simple form button on views are doing it. After pressing button i am getting this in rails server:

```
Rendered portfolio/show.erb (1.5ms)
Completed 200 OK in 24ms (Views: 4.1ms)

```

Any guesses, but the page is not refreshing by its own.