```ruby
class ActivitiesController < ApplicationController
  def index
    @user = User.find(params[:user_id])
    @activities = @user.activities.order('created_at DESC')

    respond_to do |format|
      format.html
      format.js
    end
  end
end```

Fix to use friendly_id syntax
user
```ruby
class ActivitiesController < ApplicationController
  def index
    @user = User.friendly.find(params[:user_id])
    @activities = @user.activities.order('created_at DESC')

    respond_to do |format|
      format.html
      format.js
    end
  end
end
```
assistant