Define a route that only responds to a specific format
Constrain a Rails route to a single response format such as XML when one URL must serve only that representation.
Alternative to url_for's deprecated :overwrite_params option
Rails 2.3.10 deprecation warning for url_for :overwrite_params when generating links with replaced query values. params.merge supplies the full parameter set and avoids the warning.
Silence specific deprecation warnings in Rails 3+
ActiveSupport deprecation warnings can be selectively hidden when a specific warning cannot be fixed and only certain messages should stay visible.
marco-polo improves your Rails console prompt
Displays the app name and Rails environment in the console prompt, reducing the risk of running commands in production by mistake.
has_defaults is now a gem
has_defaults is now a standalone gem; the old plugin is gone and plugins are unsupported in Rails 3.2+.
Introducing RMM, the Rails Maturity Model - Ruby on Rails meets the business world | Google Groups
A couple of Railsconfs ago, Courtenay and I did indeed discuss
Katapult 0.3.0 released
Katapult 0.3.0 adds Rails 5.1.4 and Ruby 2.5.0 support, a new Bootstrap-based design, Webpacker, and workflow and test improvements.
How to human-join an array in JavaScript
Human-friendly list formatting in JavaScript is awkward; joinSentence produces an Oxford-comma sentence from array items, similar to Rails to_sentence.
Asset pipeline may break Javascript for IE (but only on production)
JavaScript can break in Internet Explorer only after Rails asset compression in staging or production. Switching from UglifyJS to YUI Compressor can avoid these failures.
Using Apache Benchmark (ab) on sites with authentication
Authenticated pages can be benchmarked with ab by supplying the right session cookies; otherwise login-protected requests fail or measure the wrong content.
ActiveRecord meets database views with scenic
Use SQL views in a Rails app without switching the schema format to SQL; Scenic adds versioned, reversible migrations and keeps view definitions in SQL files.
How to find out if you are in Cucumber or in RSpec
Feature and spec code may need different behavior when Rails env is unavailable. Capybara.current_driver can distinguish Cucumber scenarios from RSpec examples.
Open a MySQL shell using credentials from database.yml
Open a MySQL prompt without retyping database credentials by using dbconsole with the password flag, optionally for another Rails environment.
gammons/fake_arel - GitHub
Backport Rails 3 ActiveRecord querying and chained scopes to Rails 2, including where, order, and to_sql for scopes.
rails/activeform
Alternative form objects for Rails may fit better than model-based validation and could become part of Rails 5.
EdgeRider 0.3.0 released
Adds compatibility with Rails 4.1 and Ruby 2.1, including a forward port of ActiveRecord::Base.scoped for newer Rails versions.
Rails: Disabling logging entirely
Rails logs can be silenced completely in a specific environment by replacing the logger with Logger.new('/dev/null').
The Complete Guide to Rails Caching
Caching in Ruby on Rails reduces repeated work and speeds up pages, but stale or fragmented cache data can hurt performance and correctness.
Rails 4 Countdown to 2013 | The Remarkable Labs Blog
Ruby on Rails 4 adoption will require updates for many web applications. A 31-day series prepares developers for a smoother upgrade.
Timeouts for long-running SQL queries
Database query limits prevent runaway SQL from consuming all resources; PostgreSQL statement_timeout and MySQL max_execution_time can cancel slow statements automatically.
Distance of time in what you like: days, months, years
Rails’ distance_of_time_in_words can be too imprecise when a fixed unit is needed. A custom helper returns rounded differences in days, months, or years.
ActiveRecord::StatementInvalid: Mysql2::Error: closed MySQL connection
MySQL query timeouts can leave Rails with a closed connection and failing queries. Automatic or manual reconnect restores access, but rolls back transactions and releases locks.
How to remove/disable the automatic XSS protection helper html escaping for Rails 3
Rails 3 automatically escapes helper output to prevent XSS, but some views need raw HTML instead. Disabling that protection changes how helper values are rendered and can reintroduce injection risk.
Extracting the conditions of a named scope in Rails 2.3
Named scopes in Rails 2.3 can hide reusable query filters; extracting their conditions makes them easier to inspect and reuse in other queries.