You can use CSS attribute selectors in your step definitions like this: Then /^the page should have a meta description...
The Edge Rider gem will define a method collect_ids on your ActiveRecord models, scopes, integer scalars and collections, which...
ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...
If you are using RVM on a Mac and cannot enter 8+ bit characters on an IRB or Rails console...
ActiveRecord models know how to cast a given string to the type of a given attribute (or column).
Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1...
It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...
One of the thornier problems in our workflow is knowing when assets are delivered from the designer and keeping them...
When installing RMagick you may get an error messages like this: Version 2.13.1: checking for Ruby version >= 1.8.5... yes
If you want to manually check if e-mail delivery works on a machine by sending an e-mail you...
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...
Bryan talked about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be...
Within an event handler, there are multiple methods to cancel event propagation, each with different semantics. event.preventDefault() Only prevents the...
When using ActionMailer, you can set an array of email addresses as recipients. If this array is generated by e.g...
The information in this card is only relevant for Rails 2.3-era apps. This note gives a quick introduction into...
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...
ActiveRecord comes with a method touch which sets the updated_at timestamp to the current time. Unfortunately it also runs...
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
I don't like those buttons inside the header area of a message that Thunderbird 3 put there. Though the...
Cucumber scenarios that are tagged with @javascript so they run with Selenium are very slow. You might not want to...
If you plan to insert an existing PDF into a new LaTeX document that you will compile to PDF, you...