action-cable

Set up ActionCable connections, channels, and client consumers in Rails.

6|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/RoleModel/rolemodel-skills --skill action-cable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: action-cable
Source: https://github.com/RoleModel/rolemodel-skills/tree/main/skills/action-cable
Command: npx skills add https://github.com/RoleModel/rolemodel-skills --skill action-cable

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ActionCable provides real-time WebSocket support for Rails applications, enabling server-initiated updates to be pushed to connected clients without page reloads.

Core Features & Use Cases

  • Real-time updates: push messages or data changes to subscribed clients.
  • Live notifications and dashboards: keep users informed with up-to-date information.
  • Channel-based architecture: organize logic in dedicated connections and channels and integrate with Turbo Streams for DOM updates.

Quick Start

Set up ActionCable by defining a connection at app/channels/application_cable/connection.rb, creating channels under app/channels, and wiring a client-side consumer in app/javascript/initializers/actioncable.js. Deploy subscriptions in your views or JavaScript to receive broadcasts and render updates, optionally using Turbo Streams for automatic DOM updates.

Frequently Asked Questions about action-cable

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up real-time broadcasting in a Rails application?

To set up real-time broadcasting in Rails, you define a connection in `app/channels/application_cable/connection.rb`, create specific channels under `app/channels`, and wire a client-side consumer in your JavaScript. This enables server-initiated WebSocket updates to push to connected clients without page reloads.

What is the best way to push live notifications to a Rails app without reloading the page?

The best way to push live notifications is using ActionCable to broadcast updates to subscribed clients over WebSockets. This approach keeps users informed instantly without requiring page reloads, making it ideal for live dashboards and chat features.

Can I use Turbo Streams with ActionCable for automatic DOM updates?

Yes, you can use Turbo Streams with ActionCable to render automatic DOM updates. By deploying subscriptions in your views or JavaScript, Turbo Streams integrates with the channel-based architecture to update page elements instantly when server-side changes occur.

How does server-side data synchronization work with WebSockets in Rails?

Server-side data synchronization in Rails works by organizing logic into dedicated connections and channels using ActionCable. When server-side changes occur, updates are broadcasted directly to connected clients, ensuring data reflects instantly across all subscribed user pages.

Do I need to configure a client-side consumer to enable real-time updates in Rails?

Yes, you need to wire a client-side consumer, typically in `app/javascript/initializers/actioncable.js`, to enable real-time updates. This consumer establishes the WebSocket connection and receives broadcasts from your defined Rails channels to update the client page.

Are there security considerations when implementing real-time chat with ActionCable?

Yes, there are basic security considerations when implementing real-time chat or live dashboards with ActionCable. Properly securing the connection and channels ensures that server-initiated broadcasts and WebSocket updates are only pushed to authorized, subscribed clients.