When you need to see the content of a page (i.e. not all the HTML but the relevant text body...

makandra dev
railsforzombies.org

Learning Rails for the first time should be fun, and Rails for Zombies allows you to get your feet wet...

Styling button tags across all major browsers is not easy. Many times you should be fine by using the native...

So you added a new callback to your model that (e.g.) caches some data when it is saved. Now you...

Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled:

opensoul.org

How to create an infinitely nestable hash that always defaults to a new hash if a key does not map...

github.com

Ruby's net/http is setup to never verify SSL certificates by default. Most ruby libraries do the same. That means...

You can use these step definitions: Then /^I should not see an error$/ do (200 .. 399).should include(page.status_code...

When you eagerly load an association list using the .include option, and at the same time have a .where on...

If you want to find out whether a Class object is directly inheriting from another class, use superclass: ActiveRecord::RecordNotFound.super...

RSpec 1, RSpec 2 To test whether two arrays have the same elements regardless of order, RSpec 1 and 2...

Deadlocks only occur if two transactions in separate threads compete for the same rows in the database. They usually (but...

makandra dev

Lets say you need to make a change to a commit OLD_COMMIT, but this is not the most recent...

You can get YAML.load to instantiate any Ruby object by embedding the desired class name into the YAML code. E.g...

If your controller spec never reaches your controller code: Make sure you are signed in. Make sure you are actually...

tug.dk

Gallery of fonts you can use without much hassle in LaTeX. The license of the fonts vary, but are all...

If you need to do calculations inside the database and can not use Ruby objects you may run into problems...

When a has_many association basically serves to store a list of associated strings (tags, categories, ...), it can be convenient...

This card explains how to install RubyMine for the first time. If you want to upgrade an existing RubyMine installation...

nokogiri.org

Because Nokogiri needs to be compiled and dynamically linked against both libxml2 and libxslt, it has gained a reputation for...

When you just went through a long debug-fest and infested your code with dozens of debug messages, it can...

Have you guys ever done the math on that? You asked or allowed for 24000 interruptions from literally every human...

Note that this card is very old. You might want to use ActiveType for your auto-coerced virtual attributes instead...

Occasionally some complex query must be processed on the database because building thousands of Ruby objects is impracticable.