assignable_values now lets you define a secondary default that is only used if the primary default value is not...

When you develop a gem and you have a Gemfile in your project directory, you might be surprised that your...

makandra dev

Consul 0.4.0 comes with some new features. Dependencies Consul no longer requires assignable_values, it's optional for when you...

The will_paginate gem will show a default of 30 records per page. If you want to test pagination in...

api.jquery.com

The $.cssHooks object provides a way to define functions for getting and setting particular CSS values. It can also be...

I highly recommend that you make use of RubyMine's feature to pin tabs. When you pin all "important" files...

Test suites usually grow over time as more and more development time is spent on a projects. Overall run-time...

Applications often show or hide elements based on viewport dimensions, or may have components that behave differently (like mobile vs...

makandra dev

You can specify the version of bundler to execute a command (most often you need an older version of bundler...

makandracards.com

Updated the card with our current best practice (shared app code and specs via symlinks).

If you use rails_admin, your specs pass with the rspec binary, but not using rake spec (or rake parallel...

RSpec's be_false behaves unexpectedly: nil.should be_false # passes, as the expectation returns true If you want to check...

Copy and paste at will, they're free! German quotation marks: „ “ (Ubuntu-Hotkey: AltGr+v and AltGr+b) English quotation...

I wonder if the guy that wrote BigDecimal#inspect has a tragic backstory that explains why he hates humanity.

makandra dev

Ruby 1.9.2 is very slow when loading files, especially starting Rails servers or running specs takes forever.

Always use simply require 'spec_helper' If you mix it up like require 'spec_helper' require File.dirname(__FILE__) + '/../spec_helper'

Recent rails security updates have shown that people make incorrect assumptions about the possible contents of the params hash.

Why string sorting sucks in vanilla Ruby Ruby's sort method doesn't work as expected with special characters (like...

makandra dev
github.com

Introspect the Ruby Heap by indexing, counting, locating references to and detaching (in order to release) objects.

I had trouble serving an MP4 video to my iPad. Although the video complied with all the specs (H.264 codec...

makandra dev
dzone.com

A collection of snippets to generate random number under certain conditions, as: gaussian with a specified distribution triangular distribution

Localizing a non-trivial application can be a huge undertaking. This card will give you an overview over the many...

If your project uses another version than your default Ruby, RubyMine will give you incorrect inspections, for example.\

stackoverflow.com

Using beginning_of_day or end_of_day on Date or DateTime objects in Rails 2.x applications will never...