How will the configuration file, config/cable.yml
look like for a postgreSQL adapter?
Testing Action Cable To test this connection class, we can use connect method to simulate a client server connection and then test the state of connection is as expected. The connection object is available in the test.
1 What is Action Cable? Action Cable seamlessly integrates WebSockets with the rest of your Rails application. It allows for real-time features to be written in Ruby in the same style and form as the rest of your Rails application, while still being performant and scalable.
This is working for me:
# config/cable.yml
production:
adapter: postgresql
development:
adapter: postgresql
test:
adapter: postgresql
The postgresql adapter uses the pg notify command. Keep in mind that the message body must be smaller than 8000 bytes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With