makandra dev
sitepoint.com

A look at Prawn, PDFKit, and Wicked PDF

robots.thoughtbot.com

Declare an enum attribute where the values map to integers in the database, but can be queried by name.

everydayrails.com

I recently had a need to demonstrate a data-heavy application to potential customers. Demonstrating the application with bogus numbers...

medium.com

When you, as a developer, look at the choices used to build a particular application, you’re blown away at...

gist.github.com

How to remove/disable the automatic XSS protection helper html escaping for Rails 3. This is probably a horrible idea.

By default, Rails' validates_uniqueness_of does not consider "username" and "USERNAME" to be a collision. If you use MySQL...

requiremind.com

Batman is an alternative Javascript MVC with a similar flavor as AngularJS, but a lot less features and geared towards...

Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...

makandra dev

rake stats # => LOC per controllers, models, helpers; code ratios, and more rake notes # => collects TODO, FIXME and...

makandra dev

Just found out about a great feature in Rails that seems to be around since Rails 2. Start a console...

Browsers usually cache favicons. If you update the favicon of your web site and want all visitors to see the...

faviconit.com

Eduardo Russo was tired of complex favicon creation and created his own favicon generator. It's really easy and allows...

String#indent is not a standard Ruby method. When you use it, be sure to know where this method comes...

You might have a table without a primary key set in MySQL. You can fix this by adding a primary...

Usually, Cucumber feature files live in features/. When you group them in sub directories, make sure to add -r features...

robots.thoughtbot.com

Arel is a library that was introduced in Rails 3 for use in constructing SQL queries. Every time you pass...

class Book::Page end class MyBook < Book def new_page Page.new # has to be `Book::Page` in development to...

makandra dev
tech.taskrabbit.com

At TaskRabbit, we have gone through a few iterations on how we make our app(s). In the beginning, there...

makandra dev
robots.thoughtbot.com

Rails 4.0 introduced a helpful new method for ActiveRecord queries: where.not. It can make clunky queries easier to read.

If your terminal has many tabs, you'll want to keep them organized. To change their title from the prompt...

coderwall.com

There seems to be no way to use therubyracer -v '0.11.4' and libv8 -v '3.11.8.17' on OS X Mavericks.

dev.mysql.com

A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...

When you do something like this in your code: def var_value @var ||= some_expensive_calculation end

If you have a FooController and also have a layout app/views/layouts/foo.html, Rails will use this without being told so.