PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
If you want to move an element inside an array, neither JavaScript/ES6+ nor libraries like LoDash offet that natively.
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...
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...
The debugger gem does not seem to be properly working on Ruby 2. Use byebug instead! Byebug is a simple...
The attached RSpec matcher allows for comfortably testing delegation. Examples describe Post do it { should delegate(:name).to(:author).with...
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...
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...
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...
Just found out about a great feature in Rails that seems to be around since Rails 2. Start a console...
You might have a table without a primary key set in MySQL. You can fix this by adding a primary...
Sometimes you have a test expectation but actually want a better error message in case of a failure. Here is...
Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...
A MySQL DECIMAL column is used when it is important to preserve exact precision. It takes two parameters, where...
We have released Modularity 2. It has many incompatible changes. See below for a script to migrate your applications automatically...