How to silence "I18n.enforce_available_locales" deprecation warnings
Rails 3.2.16 and 4.0.2 can emit deprecation warnings for invalid I18n locales after upgrades; I18n.enforce_available_locales controls whether unsupported locales are validated.
Ruby on Rails 4 and Batman.js
Batman.js is a lightweight JavaScript MVC framework with a Rails-friendly style for building small client-side apps and blog tutorials.
4 Lessons Learned Doing Angular on Rails
Experience from building an Angular frontend with a Rails backend, highlighting practical lessons for teams combining a JavaScript client with server-side Ruby on Rails.
Differences between transactions and locking
Concurrent database access needs two different tools: transactions for atomic multi-row changes and locks for exclusive access; using the wrong one causes lost updates and deadlocks.
Delivering Carrierwave attachments to authorized users only
Sensitive file attachments can be restricted to authorized users, or served from hashed public paths and expiring URLs for safer access without exposing direct storage locations.
Riding Rails: Rails 4.0: Final version released!
Rails 4.0 is ready after betas and release candidates, bringing new features and removing older ones past their expiration date.
Asset pipeline for Rails 2
Rails 2.3 can use the Rails 3.1 asset pipeline through a backport for managing and serving static assets.
Rails ERD – Entity-Relationship Diagrams for Rails
Generate visual database relationship maps from Rails ActiveRecord models for easier schema understanding and documentation.
When Sass-generated stylesheets print a Encoding::CompatibilityError
Sass-generated stylesheets can surface Encoding::CompatibilityError after a Rails and Ruby upgrade, often from stale cache files or mismatched UTF-8 and ASCII-8BIT encodings.
How to fix zero-byte downloads with Rails 3 and Apache / Passenger
Zero-byte downloads in Rails 3 behind Apache/Passenger often come from missing X-Sendfile support, leaving file responses empty.
Even with bundler your gem order can be significant
Gem loading order in a Gemfile can still matter with Bundler when gems require application classes or each other during load, and Rails may fail to boot.
Logic of `where.not` with multiple attributes
where.not with multiple hash attributes uses NAND logic, excluding only records that match all conditions; chained calls behave like NOR and exclude matches to any condition.
Get Your App Ready for Rails 4
Preparing an existing Rails app for Rails 4 involves updating deprecated APIs, dependencies, and configuration before upgrading the framework.
Responding to the OPTIONS HTTP method request in Rails: Getting around the Same Origin Policy
Rails applications can answer browser preflight requests and allow controlled cross-origin access by handling OPTIONS requests with CORS headers.
SameSite cookies
Browser defaults are shifting toward SameSite=Lax, making cross-site cookie behavior stricter and exposing iframe, API, and non-GET request flows that need SameSite=None or Strict.
Auto-generate Cucumber navigation paths
Cucumber step definitions can map natural-language destinations to Rails route helpers, including list, new, edit, and record lookup paths.
Fix: "undefined method `bytesize' for #<Array>"
WEBrick can mask Rails startup failures with undefined method bytesize for #<Array>, hiding the real cause until logs are checked or another server is used.
Aggregated RSpec/Cucumber test coverage with RCov
RCov defaults fail to aggregate RSpec and Cucumber coverage cleanly; a custom rake rcov:all task produces a Rails report for app/**/*.rb only.
Using StaticMatic for static pages
Build static pages with Rails-like comforts such as HAML, SASS, helpers and partials, then compile everything to plain HTML and CSS.
ActiveRecord: How to use ActiveRecord standalone within a Ruby script
Run ActiveRecord without Rails in a tiny Ruby script to reproduce bugs or test associations with an in-memory SQLite database.
Retrieving the class an ActiveRecord scope is based on
Edge Rider adds #origin_class to relations, returning the underlying class for unscoped lookups across Rails versions.
List of :status symbols for rendering in Rails
Rails render accepts HTTP status symbols such as :bad_request, making responses more readable than numeric codes.
When Rails no longer renders changes in view templates or Sass stylesheets
Cached pages in development can prevent Rails from rendering updated view templates or Sass stylesheets, especially when stale files remain in public/.
Rails 3.1.0 has been released!
Rails 3.1 adds jQuery by default, streaming responses, role-based attr_accessible, prepared statements, and simpler migrations.