Rails 7+ specialist that optimizes Active Record queries with includes/eager_load, implements Turbo Frames and Turbo Streams for partial page updates, configures Action Cable for WebSocket connections, sets up Sidekiq workers for background job processing, and writes comprehensive RSpec test suites. Use when building Rails 7+ web applications with Hotwire, real-time features, or background job processing. Invoke for Active Record optimization, Turbo Frames/Streams, Action Cable, Sidekiq, RSpec …
All-time #3361Trending #6395First seen Jan 21, 2026
Rails 7+ specialist that optimizes Active Record queries with includes/eager_load, implements Turbo Frames and Turbo Streams for partial page updates, configures Action Cable for WebSocket connections, sets up Sidekiq workers for background job processing, and writes comprehensive RSpec test suites.
Use when building Rails 7+ web applications with Hotwire, real-time features, or background job processing.
Invoke for Active Record optimization, Turbo Frames/Streams, Action Cable, Sidekiq, RSpec Rails.
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Validate — bundle exec rspec must pass; bundle exec rubocop for style
- If specs fail: check error output, fix failing examples, re-run with --format documentation for detail - If N+1 queries surface during review: add includes/eager_load (see Common Patterns) and re-run specs
# app/controllers/posts_controller.rb
def index
@posts = Post.includes(:author).page(params[:page])
@next_page = @posts.next_page
end
Sidekiq Worker Template
# app/jobs/send_welcome_email_job.rb
class SendWelcomeEmailJob < ApplicationJob
queue_as :default
sidekiq_options retry: 3, dead: false
def perform(user_id)
user = User.find(user_id)
UserMailer.welcome(user).deliver_now
rescue ActiveRecord::RecordNotFound => e
Rails.logger.warn("SendWelcomeEmailJob: user #{user_id} not found — #{e.message}")
# Do not re-raise; record is gone, no point retrying
end
end
# Enqueue from controller or model callback
SendWelcomeEmailJob.perform_later(user.id)
Strong Parameters (controller template)
# app/controllers/posts_controller.rb
class PostsController < ApplicationController
before_action :set_post, only: %i[show edit update destroy]
def create
@post = Post.new(post_params)
if @post.save
redirect_to @post, notice: "Post created."
else
render :new, status: :unprocessable_entity
end
end
private
def set_post
@post = Post.find(params[:id])
end
def post_params
params.require(:post).permit(:title, :body, :published_at)
end
end
Constraints
MUST DO
Prevent N+1 queries with includes/eager_load on every collection query involving associations
Write comprehensive specs targeting >95% coverage
Use service objects for complex business logic; keep controllers thin
Add database indexes for every column used in WHERE, ORDER BY, or JOIN
Offload slow operations to Sidekiq — never run them synchronously in a request cycle
MUST NOT DO
Skip migrations for schema changes
Use raw SQL without sanitization (sanitize_sql or parameterized queries only)
Expose internal IDs in URLs without consideration
Output Templates
When implementing Rails features, provide:
Migration file (if schema changes needed)
Model file with associations and validations
Controller with RESTful actions and strong parameters