Rails Releases (Index of /archives)
List of Rails releases.
Related cards:
PSA: "index: true" in Rails migrations does not work as you'd expect
Several Rails migration methods accept index: true
as an option to create an index. In some cases (like #add_column
), this option is silently discarded. Know what you are doing, or use #add_index
instead.
Example
Consider the following ...
Performance analysis of MySQL's FULLTEXT indexes and LIKE queries for full text search
When searching for text in a MySQL table, you have two choices:
- The LIKE operator
- [FULLTEXT](http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html...
Collection of Rails development boosting frameworks
Development environment setup
Rails Composer
: Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server, template engine, unit and integration t...
Rails and Postgres: How to test if your index is used as expected
This is a small example on how you can check if your Postgres index can be used by a specific query in you Rails application. For more complex execution plans it might still be a good idea to use the same path of proof.
1. Identify the...
Rails: Postgres Partial Indexing
PostgreSQL has partial indexes. With a partial index you tell Postgres to only index rows matching a given query.
Some uses cases for a partial index:
- You want a uniqueness index, but...
Understanding race conditions with duplicate unique keys in Rails
validates_uniqueness_of
is not sufficient to ensure the uniqueness of a value. The reason for this is that in production, multiple worker processes can cause race conditions:
- Two concurrent requests try to create a user with the same name (a...
Default views in Rails 3.0 with custom resolvers
It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let’s say you have a bunch of controllers inside the Admin namespace and you would like each action to fallback to a default template. So if ...
Security issues with hash conditions in Rails 2 and Rails 3
Find conditions for scopes can be given either as an array (:conditions => ['state = ?', 'draft']
) or a hash (:conditions => { 'state' => 'draft' }
). The later is nicer to read, but has horrible security implications in some versions of Ru...
RailsLab .:. Scaling Rails - Scaling Rails Screencasts
Learn everything you need to know about Scaling your Rails app through 13 informative Screencasts produced by Gregg Pollack with the support of New Relic.
Passenger ignores RailsEnv directive for Rails 3 applications
You might find that your Passenger ignores all RailsSomething
directives in the vhost for your new Rails 3 application. The culprit is a file config.ru
which makes Passenger consider your application a Rack (non-Rails) application.
To fix thi...