Rails

Build reliable Rails apps avoiding ActiveRecord traps, N+1 queries, and callback pitfalls.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Rails" with this command: npx skills add ivangdavila/rails

Quick Reference

TopicFile
N+1, callbacks, validations, scopesactiverecord.md
Strong params, filters, rendercontrollers.md
Route conflicts, constraintsrouting.md
Partials, helpers, caching, XSSviews.md
ActiveJob, Sidekiq, retriesjobs.md
Mass assignment, CSRF, SQL injectionsecurity.md

Critical Rules

  • save returns false on failure — save! raises, check return or use bang
  • update_all/delete_all skip callbacks and validations — data corruption if unaware
  • find_each for batches — Model.all.each loads entire table into memory
  • redirect_to doesn't halt execution — code after it runs, use and return
  • dependent: :destroy missing — orphan records accumulate forever
  • default_scope pollutes all queries including joins — almost always wrong
  • Callbacks chain silently — throw :abort stops save but returns false, not exception
  • includes without references in where string — N+1 still happens
  • ||= memoization caches nil/false — use defined?(@var) ? @var : @var = compute
  • has_many through: vs has_and_belongs_to_many — latter has no join model for attrs
  • Nested before_action — multiple inheritance makes flow unreadable
  • render doesn't stop action — code continues, duplicate render crashes

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

Dopesecurity

Dope.security integration. Manage data, records, and automate workflows. Use when the user wants to interact with Dope.security data.

Registry SourceRecently Updated
1510Profile unavailable
Security

Contrast Security

Contrast Security integration. Manage data, records, and automate workflows. Use when the user wants to interact with Contrast Security data.

Registry SourceRecently Updated
1600Profile unavailable
Security

Conjur

Conjur integration. Manage security and secrets-management data, records, and workflows. Use when the user wants to interact with Conjur data.

Registry SourceRecently Updated
1140Profile unavailable
Security

Securitytrails

SecurityTrails integration. Manage data, records, and automate workflows. Use when the user wants to interact with SecurityTrails data.

Registry SourceRecently Updated
1220Profile unavailable