It might sound trivial, but there is no such thing as a "hover" or "mouseover" state on touch devices. If...

When selecting records in a date range, take care not to do it like this: start_date = Date.parse('2007-05...

Basically, you now need to know if your project uses a "real" time zone or :local, and if config.active_record.time_zone...

Back in the war, Rails developers had to manually HTML-escape user-supplied text before it was rendered in a...

When your Cucumber feature seems to forget cookies / sessions when you run it with Selenium check if the test travels...

While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...

Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...

When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...

makandra dev

When you need to create a locale for a language variant (like Austrian for German), you probably don't want...

When you generate a URL in a mailer view, ActionMailer will raise an error unless you previously configured it which...

Here are some popular mistakes when using nested forms: You are using fields_for instead of form.fields_for.

If you want to have an English Ubuntu UI, but still see dates, money amounts, paper formats, etc. in German...

Sass comes with many built-in functions to manipulate color. Some of the more interesting functions include: adjust-hue($color...

(Rails has a method ActiveRecord::Relation#merge that can merge ActiveRecord scopes. However, its behavior has never been clear, and...

We often have a separate production branch that lags a bit behind the more cutting edge main branch. Sometimes you...

Occasionally you need to do something directly on the server -- like having all records recalculate something that cannot be done...

When storing floating-point numbers such as prices or totals in an SQL database, always use a DECIMAL column. Never...

Partials always define a local variable with the same name as themselves. E.g. when you are in _recent_users.html.erb, a local...

linux.die.net

Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1...

makandra dev

Within an event handler, there are multiple methods to cancel event propagation, each with different semantics. event.preventDefault() Only prevents the...

When you need to insert many records into the same table, performance may become an issue. What you can do...

So you are comparing two Time objects in an RSpec example, and they are not equal, although they look equal...

There are two ways to define a class method from a Modularity trait. Note that the usual caveats regarding class...

makandra dev
wiki.debian.org

This note is a reminder that there is something called AppArmor that could cause weird errors ("File not found", "Can...