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

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

github.com

As the title says: this jQuery plugin creates bar charts from HTML tables. It comes in some different flavors.

ebobby.org

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

If you get a stacktrace complaining about uninitialized constant MysqlCompat::MysqlRes a system library update might broke your gem.

The classical scenario: There's a parent div element and you want to center some arbitrary child element vertically inside...

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

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

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

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

Simply use OpenStruct#to_h to receive an OpenStruct's hash representation. In older Rubies you need OpenStruct#marshal_dump...

When you work in the MySQL console and you want to see which database is used, type: SELECT database();

If you want to update some records with boolean fields in a migration, always remember to set your values with...

makandra dev

This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...

For string columns, MySQL indexes the left side of a string. That means an index can speed a like query...

makandra dev
twitter.github.com

Explanation of the "bootstrap 2" base CSS. Contains information about: Typography Code Tables Forms Buttons Icons

So you got this error, even though your Gemfile bundles mysql2: !!! Missing the mysql2 gem. Add it to your Gemfile...

dev.mysql.com

The next version of MySQL will include a built-in memcached daemon. This daemon can quickly get and set key/value...

Unless you changed the default, this will be 16 MB: mysql> SHOW VARIABLES WHERE Variable_name="max_allowed_packet"; +--------------------+----------+

Sometimes, you may want to open up a second database connection, to a read slave or another database. When doing...

makandra dev
dev.mysql.com

Take care in queries where multiple AND or OR operators are used. In doubt, always use braces to enforce precedence...

This will make MySQL log all received queries so you can see for yourself what happens on the database level...

ActiveSupport >= 3 has Date.parse('2011-02-10').beginning_of_quarter #=> 2011-01-01 Date.parse('2011-02-10').end_of_quarter...

If you upgrade to the mysql2 gem, you will run into the problem that the server's database.yml (which is...