Validations that need to access an associated object may lead to some trouble. Let's exemplify that using this example...
We often have a separate production branch that lags a bit behind the more cutting edge main branch. Sometimes you...
You can seriously speed up deployments with Capistrano when using a local git repository on the server you are deploying...
When deploying an application with "cap deploy" by default [1] you only deploy your code but do not run migrations...
Airbrake (formerly Hoptoad) already ignores certain errors like InvalidAuthenticityToken by default (see Airbrake::Configuration::IGNORE_DEFAULT).\ To ignore additional classes...
The Edge Rider gem will define a method collect_ids on your ActiveRecord models, scopes, integer scalars and collections, which...
To display a list of your current Git remotes and their endpoints, you can say git remote -v
If you want to convert a README.rdoc file to HTML, say this from a shell: rdoc README.rdoc
Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1...
User.active.to_sql Rails 2 Use either the Edge Rider or fake_arel gem to get #to_sql backported...
One of the thornier problems in our workflow is knowing when assets are delivered from the designer and keeping them...
Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.
There is a nasty bug in all version of Rails 2 and some versions of Rails 3.x where two...
Within an event handler, there are multiple methods to cancel event propagation, each with different semantics. event.preventDefault() Only prevents the...
Note that you cannot currently use Ruby 1.9.2 with Rails 2 applications that use RSpec, so don't upgrade if...
Sometimes you can make your life easier by not allowing a record attribute to be changed after the record was...
blueprint is DevStructure’s workhorse tool that looks inside popular package managers, finds changes you made to configuration files, and...
Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2
Merging .po-files with Git is painful. There have been attempts of making Git more clever when trying to merge...
The shell variable PS1 holds your bash prompt. You might want to change it to serve your needs best. Here...
Add deprecation warnings and their solution or link to available solutions. Global access to Rake DSL methods is deprecated. Please...
If in your application your users pass along params that result in filenames, like invoices/generated?number=123. This could be...
If you have the following deprecation warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated...
You will occasionally need to clean out your database while keeping the schema intact, e.g. when someone inserted data in...