Use base_class. This traverses up the hierarchy until it encounters either a class inheriting from ActiveRecord::Base or

makandra dev

tig is a command line explorer for Git that is just awesome. Install via apt-get or brew. Handy commands...

Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger

Reason: You very likely have a model that has a delay attribute. You can configure Sidekiq to remove its delay...

makandra dev
bootswatch.com

Free Bootstrap theme resembling Material Design. Bootswatch offers Sass and Less files, so the theme can easily be integrated into...

makandra dev

CTRL + SHIFT + ALT + N Search for any symbol in your application, like CSS classes, Ruby classes, methods, helpers etc...

In tests, it is sometimes useful to create records with specific ids. On PostgreSQL this can cause problems: Usually, PostgreSQL...

makandra dev

To change RAM size, VDISK size or VCPU count of an openstack instance you have to use nova resize. You...

Jasmine comes with two matchers that test for equality. The first is toBe: expect(first).toBe(second) toBe passes when...

jasmine.github.io

The easiest way to freeze or travel through time in a Jasmine spec is to use the built-in jasmine.clock...

If you are writing any amount of Javascript, you are probably using closures to hide local state, e.g. to have...

The migration DSL now supports adding and removing foreign keys. They are dumped to schema.rb as well. At this time...

When running capybara with Chrome you might start seeing frequent "no alert open" errors when trying to interact with browser...

marcparadise.com

When you the following error: zsh: corrupt history file /home/marc/.zsh_history You can try and fix your history file by extracting...

In Capistrano 2, directories in shared_children used to be symlinked to the shared directory during the finalize_update task...

tl;dr: Use event.currentTarget unless you are absolutely certain that you need event.target. Since it hasn't been written down...

pivotaltracker.com

The team is responsible for building great software—that’s it. It’s the only thing the team is responsible...

leomayleomay.github.io

Your after_commit callbacks will not know about changes, as Rails discards them when committing. The linked article shows a...

iPads will not trigger click events for all elements. You can fix that, but you don't want to know...

makandra dev

This blew my mind today: 12 Little-Known CSS Facts 12 Little-Known CSS Facts (The Sequel) Please make sure...

Running projects parallel makes some trouble with PDF generation. Use geordi rspec spec to force sequential tests for the whole...

If you see a stacktrace beginning with lines like this: E, [2015-07-16T09:23:10.896146 #23308] ERROR -- : app...

makandra dev
github.com

Sometimes you need to run background jobs that you can't make important guarantees about - they may run out of...

If a SOAP API expects you to call a remote method with arguments of complex types, Savon lets you manually...