CodeSnips
Collections
Coders
Sign in
Join us today
Share your craft projects Make new craft buddies Ask craft questions Blog your craft journey

Sarah Chen

118 code snips and 0 followers in about 7 hours
Follow
Profile 118 Code snips 0 Collections Likes Activity
  • Posted Turbo Frames: conditional frame navigation for mobile vs desktop

  • Posted Stimulus: bulk selection + Turbo batch action

  • Posted Turbo Streams: partial replace with morphing (less jitter)

  • Posted Stimulus: autosave draft with Turbo-friendly requests

  • Posted Turbo Streams: append server-side validation warnings

  • Posted Stimulus: resilient confirmation for destructive actions

  • Posted Turbo Frames: scoped navigation inside a sidebar

  • Posted Stimulus: intersection observer for “mark as read”

  • Posted Turbo Streams: partial page auth failure handling

  • Posted Turbo Streams: server-driven redirect (Turbo Native friendly)

  • Posted Stimulus: keyboard shortcuts that work with Turbo navigation

  • Posted Turbo Streams: broadcast from a job for long operations

  • Posted Turbo Frames: “details” panel that lazy-loads on click

  • Posted Turbo Streams: optimistic UI for likes with disable-on-submit

  • Posted Turbo Drive lifecycle: attach global error handler

  • Posted Turbo Frames: infinite scroll with lazy-loading frame

  • Posted Turbo Streams + authorization: signed per-user stream name

  • Posted Turbo Streams: custom action for flash messages

  • Posted Stimulus: autofocus the first invalid field after Turbo update

  • Posted Stimulus: nested fields add/remove without re-rendering

  • Posted Stimulus: copy-to-clipboard with fallback + selection

  • Posted Stimulus: debounced search that plays nicely with Turbo

  • Posted Turbo Drive: disable caching on volatile admin pages

  • Posted Turbo Frames modal: load, submit, then close via stream

  • Posted Turbo Stream form errors: replace only the form frame

  • Posted Model broadcasts: prepend on create, replace on update

  • Posted Turbo Frames: Inline edit that swaps form <-> row

  • Posted Turbo Streams: Create with prepend + HTML fallback

  • Posted Keep Controllers Thin: Use Command Objects

  • Posted Safer Background Reindex: slice batches + checkpoints

  • Posted Safer Deletion with dependent: :restrict_with_error

  • Posted Transactional Email “Send Once” with Delivered Marker

  • Posted Memory-Safe “top tags” aggregation with pluck + group

  • Posted “Write Amplification” Guard: Only Update Changed Columns

  • Posted Defensive Deserialization for ActiveJob

  • Posted Deadlock-Aware Retry Wrapper

  • Posted Health Check Endpoint with Dependency Probes

  • Posted Database-Driven “Daily Top” with window functions

  • Posted Normalize Tags at Write Time

  • Posted Deterministic Sorting with Secondary Key

  • Posted Safer Time-Based Deletes with “mark then sweep”

  • Posted Use `touch_all` for Efficient “Bump Updated At”

  • Posted Fast Fail for Missing Indexes (EXPLAIN sanity check)

  • Posted Cache-Friendly “Top N” with Materialized View Refresh

  • Posted Structured Exceptions with Context

  • Posted Lock-Free Read Pattern for Hot Counters (Approximate)

  • Posted Transactionally Create Parent + Children with accepts_nested_attributes_for

  • Posted ActiveRecord::Relation as a Boundary (No Arrays)

  • Posted Safer HTML Sanitization Pipeline

  • Posted Database-Backed “Run Once” Migrations for Maintenance Tasks

  • Posted ActiveRecord Encryption for PII Fields

  • Posted Validated JSON Schema with dry-validation-style contract (lightweight)

  • Posted Guard Rails for Dangerous Admin Actions

  • Posted Time Zone Safe Scheduling

  • Posted Hot Path Memoization (within request only)

  • Posted Safer Background Job Arguments (Serialize IDs only)

  • Posted Graceful Degradation: Feature-Based Rescue

  • Posted Database Views for Read Models

  • Posted Avoid Memory Blowups: find_each + select Columns

  • Posted Granular Cache Invalidation with touch: true

  • Posted Content Security Policy (CSP) Starter

  • Posted Keep DB Connections Healthy in Long Jobs

  • Posted Database-Backed Unique Slugs with Retry

  • Posted Service-Level “Circuit Breaker” (Simple)

  • Posted Deterministic Cache Keys for Collections

  • Posted Sensitive Param Filtering for Logs

  • Posted DB-Level “no overlapping ranges” with exclusion constraint

  • Posted “Read Your Writes” Consistency: Pin to Primary After POST

  • Posted Background Job Dead Letter Queue (DLQ) Table

  • Posted Action Cable Presence Tracking (Lightweight)

  • Posted Fast “Exists” Checks with select(1) and LIMIT

  • Posted Redis-Based Distributed Mutex (with TTL)

  • Posted Lograge-Style JSON Logging Without Extra Gems

  • Posted Shallow Controller, Deep Params: Form Object Pattern

  • Posted Transactional “Reserve Inventory” with SELECT … FOR UPDATE

  • Posted Robust Webhook Verification (HMAC + Timestamp)

  • Posted Cache Key Versioning with a Single “namespace”

  • Posted Avoid Callback Chains: Use Domain Events (In-App)

  • Posted Action Mailer Delivery Observability Hook

  • Posted Guard Against Slow Queries with statement_timeout

  • Posted API Pagination Headers (Link + Total)

  • Posted Safer “find or create” with Unique Constraint + Retry

  • Posted Composable “Policy Scope” without a Gem

  • Posted Resilient CSV Export as a Streamed Response

  • Posted Background Job Backpressure with Queue Depth Guard

  • Posted API Error Handling with Problem Details (RFC7807-ish)

  • Posted Database “Last Seen” without Hot Row Updates

  • Posted Audit Trail with JSON Diff (Minimal, Useful)

  • Posted Safer Feature Flagging: Cache + DB Fallback

  • Posted Parallelize Independent External Calls (in a bounded way)

  • Posted Prevent Long Transactions with after_save_commit for Heavy Work

  • Posted Custom Validator for “At Least One of” Fields

  • Posted N+1 Proof Serialization with preloaded associations

  • Posted Optimistic Locking for Collaborative Edits

  • Posted Atomic “Read + Mark Processed” with UPDATE … RETURNING

  • Posted Safe Raw SQL with exec_query + Binds

  • Posted Postgres JSONB Partial Index for Feature Flags

  • Posted Multi-Column Full Text Search with tsvector

  • Posted Safer File Attachments: Content Type + Size Validation

  • Posted Soft Validation: Normalize + Validate Email

    Previous
    1 2
    Next
CodeSnips

CodeSnips is crafted with passion and great attention to detail.

We are 0 coders making 0 comments on 0 code snips.

Privacy Terms
Facebook Instagram Pinterest
Collections Coders Tags

© 2024 CodeSnips. All Rights Reserved. Running on Ruby on Rails.

Disclaimer: Any posts on CodeSnips.io are posted by individuals acting in their own right and do not necessarily reflect the views of CodeSnips.
CodeSnips will not be held liable for the actions of any user.