```ruby
class MainChatController < ApplicationController
  respond_to :html, :json

  def index
    respond_with Message.last_five_main_chat_messages
  end
end
```

Move MainChatController to use refactored last_five_chat_messages method
user
```ruby
class MainChatController < ApplicationController
  respond_to :html, :json

  def index
    respond_with Message.last_five_chat_messages("main")
  end
end
```
assistant