Firefox 5.0.1, which we were using for most Rails 2.3 projects, does not run on Ubuntu 14.04 any more. Here...

In a JavaScript console, type this: > 9112347935156469760 9112347935156470000 Ooops. And that's not a float! This occurs because JavaScript uses...

JavaScript's NaN ("Not a Number") is hard to compare against. It never equals anything, not even itself:

Since we are using LoDash instead of UnderscoreJS in recent/current projects, you should keep in mind that their syntax is...

We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...

api.rubyonrails.org

To avoid n+1 queries, you want to eager-load associated records if you know you need to access them...

makandra dev
github.com

PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...

stackoverflow.com

If you want to move an element inside an array, neither JavaScript/ES6+ nor libraries like LoDash offet that natively.

makandra dev
github.com

edge_rider is Power tools for ActiveRecord relations (scopes). Please note that some of the functions edge_rider provides have...

You know each_with_index from arrays: ['hello', 'universe'].each_with_index do |value, index| puts "#{index}: #{value}" end

While RSpec 1 and 2 decided that specs inside spec/model are model specs, and those inside spec/features are feature specs...

makandra dev

Spreewald 1.1.0 drops the be_true and be_false matchers in order to be RSpec 3 and Ruby 2 compatible...

Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...

makandra dev
github.com

The debugger gem does not seem to be properly working on Ruby 2. Use byebug instead! Byebug is a simple...

makandra dev
gist.github.com

The attached RSpec matcher allows for comfortably testing delegation. Examples describe Post do it { should delegate(:name).to(:author).with...

makandra dev
plugins.jquery.com

SudoSlider is a simple yet powerful content slider that makes no (or very few) assumptions about your markup and is...

This card describes how to pass an array with multiple element to a JavaScript function, so that the first array...

makandra dev

You need this awkward command: page.driver.browser.action.move_to(page.find(selector).native).perform Note that there are better ways for newer Capybaras...

When you have a string containing umlauts which don't behave as expected (are not matched with a regexp, can...

makandra dev
tldp.org

There are 3 built-in file descriptors: stdin, stdout and stderr (std=standard). (You can define your own, see the...

When using @media CSS queries, Internet Explorer 8 and below will fail to respect them. Though there are several options...

Edge Rider gives your relations a method #origin_class that returns the class the relation is based on.

With this command you can initiate an application restart without touching restart.txt. Unlike touching restart.txt, this tool initiates the restart...

If you regularly get ActionView::MissingTemplate exceptions, maybe some bot visits your site requesting silly formats like: http://www.rails-app.com/makandra.html-username-2000...