apidock.com

Using rename_column, remove_column, etc. more than once in a migration makes that migration run slower than it should...

If you get the above error when running tests in bulk (but not individually), it's actually the fault of...

When you have objects in your database that hold latitude and longitude and you want to find others that are...

Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...

When using state_machine you sometimes need to know whether an object may execute a certain transition. Let's take...

Forms with many inputs (600+ in my case) become extremely unresponsive on an iPad, up to the point where it...

makandra dev

ActiveSupport's memoize has a dangerous feature you might not know about. Assume you have class DeepThought extend ActiveSupport::Memoizable...

There are several options, but most of them are impractical. The best way is to use the :ruby filter:

After starting the Rails server in a freshly generated Rails 3.1 project you could see an error message such as...

Note: This applies specifically to MySQL. In PostgreSQL for example, this is not an issue. If you care about performance...

Clearance is a gem that provides authentication functionality (e.g. login, logout). This note explains, how the clearance login, logout and...

Web fonts are awesome. After being restricted to Arial for two decades there is finally a cross-browser way to...

You must reconfigure the guest so it will get its own IP address: Shutdown the guest In the guest's...

sgruendel.blogspot.com

When you install Type 1 fonts (like makandra's corporate typeface), they won't show up in OpenOffice. OpenOffice requires...

By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need...

danhixon.github.com

If you encounter the error message above when running cucumber, just execute... rm rerun.txt ...in the Rails directory.

When using the screen tool you may be unable to start a screen session but instead encounter an error:

To show the collation of your tables you have to login to the MySQL console and execute SHOW TABLE STATUS...

To show the MySQL default character set you have to login to the MySQL console and execute SHOW VARIABLES LIKE...

linux.die.net

You can convert git commits into patch files. Those can be used to apply to a different repository [1] or...

stackoverflow.com

The solution in this card is based on a stack overflow post by Leventix. If you need to make request...

First keep in mind that :dependent => :destroy hooks into before_destroy. So when you use other before_destroy callbacks the...

ckeditor.com

Using the jQuery adapter breaks the built-in save function of CKEditor. Phenomenon: The page is submitted correctly, but the...

Please note that you can break your system with this! This is not recommended. Sometimes the package repository has errors...