icelab.com.au

We love Markdown. We use it wherever we can for text formatting. In a web app, the obvious place for...

This only applies to RSpec below version 1.3.2. The issue has been fixed in RSpec 1.3.2, and most likely RSpec...

When your model is using a callback like before_save or before_validation to calculate an aggregated value from its...

Imagine you have 2 HTML boxes. The first one has a margin-bottom of let's say 30px and the...

REST Client is a nice, simple HTTP client library for Ruby. When you do a simple GET request like that...

Don't you just hate to write Cucumber path helpers to be able to say this?

This is a very general introduction to MV* Javascript frameworks. This card won't tell you anything new if you...

In order to save the original value of a constant, set the new value and restore the old value after...

Tooltips that are delivered through HTML attributes are encoded. Decode entities before checking for their presence. Capybara: Then /^there should...

github.com

Some helpers for poking around at your Capybara driven browser's cookies in integration tests. Supports Capybara's bundled drivers...

You can use text-overflow to truncate a text using CSS but it does not fit fancy requirements.

When using Rails to truncate strings, you may end up with strings that are still too long for their container...

The step definition below lets you say: Then I should see a field "Password" But I should not see a...

Most of the JavaScript snippets have code that manipulates the DOM. For that reason dom manipulating javascript code should have...

Views are normally (for good reason) not rendered in controller specs. If you need it to happen, use:

makandra dev

I have no idea how it's supposed to work (or why the don't have a print CSS), but...

stackoverflow.com

Though Internet Explorer 9 supports the box-shadow CSS property there is a nasty bug which sometimes prevents it from...

When you print out a HTML pages, all raster images (like PNGs) will appear aliased. This is because a printer...

Although it's tempting flirt with detecting mobile/touch devices with CSS media queries or Javascript feature detection alone, this approach...

makandra dev

When you're getting this error, one possibility is that you've created a select field for an association instead...

One of the most common production errors are ActionController::MethodNotAllowed errors. They usually happen when someone reloads a form by...

Submit buttons in Rails come with a useful option :disable_with which will disable the button when clicked and change...

makandra dev

When you use one line Ruby comments in ERB templates you should never do this (notice the whitespace in front...

makandra dev

There are two types of forms: User forms, e.g. for sign up, and Administration forms, to maintain data. They are...