Our old solution for cronjobs, the "craken" plugin, is no longer maintained and does not work on Rails 3.2+.

ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...

For two years we've been using SearchableTrait which gives models the ability to process Googlesque queries like this: Contact.search...

Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the...

If you can now longer hear or record sounds after upgrading Ubuntu, you probably need to re-tell Ubuntu which...

In Rails 2, when calling instance_eval or instance_exec on a scope, the scope will fetch its records from...

ebobby.org

A technique to vastly reduce the number of join model records that need to be stored in the database.

Since I use this a lot in my daily work and there were no scripts working properly for me, I...

When you have two models in a has_many, has_one or belongs_to association, the :inverse_of option in...

coding.smashingmagazine.com

JavaScript engines such as Google’s V8 (Chrome, Node) are specifically designed for the fast execution of large JavaScript applications...

Icon fonts like Font Awesome are infinitely scalable, look great on high-DPI displays and will give your app a...

Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is...

stackoverflow.com

url = 'http://www.foocorp.com/foo/bar' URI.parse(url).host # => www.foocorp.com Note that this will raise an error if the given argument is...

In theory you can take any scope and extend it with additional joins or conditions. We call this chaining scopes...

ActiveModel::Errors is used to handle validation errors on Rails objects. If you inspect an instance, it feels like a...

If you require your Rails models manually, pay attention to the path you use. Unless you have...

If your application has forms to edit string fields, you probably want to strip the entered values (remove whitespace from...

blog.codeclimate.com

“Fat models” cause maintenance issues in large apps. Only incrementally better than cluttering controllers with domain logic, they usually represent...

Example task: Multiply the table holidays between several stages. Open two terminals: shell-for stage_1 shell-for stage_2...

If this happens to you: user.avatar = Avatar.new user.avatar # => nil (where avatar is a belongs_to), you probably declared your association...

Cucumber_rails' old-school web-steps have been deprecated for a while, urging developers to write high-level step definitions...

There is no reason to leave trailing whitespace characters in your project's files, so don't add any.

web.archive.org

TL;DR Avoid before(:context) (formerly before(:all)), use before(:example) (formerly before(:each)) instead. If you do use before...

makandra dev

Today I got a better understanding of how git works, in particular what git checkout and git reset do.