```ruby
class DemoController < ApplicationController
  include SmartListing::Helper::ControllerExtensions
  helper SmartListing::Helper

  def index
    return root_path if Rails.env.production?

    smart_listing_create :procedures,
                         Procedure.where(archived: false),
                         partial: "demo/list",
                         array: true
  end
end
```

Fix bug route /demo in production : Error 500 on redirect_to
user
```ruby
class DemoController < ApplicationController
  include SmartListing::Helper::ControllerExtensions
  helper SmartListing::Helper

  def index
    return redirect_to root_path if Rails.env.production?

    smart_listing_create :procedures,
                         Procedure.where(archived: false),
                         partial: "demo/list",
                         array: true
  end
end
```
assistant