Starting with has_defaults 0.4.2, default values that are lambdas are no longer called with the current object as argument...
FactoryBot.define do factory :parent do transient do child_name nil child_allowed_to_drive false end child do association(:child...
When using Savon to connect a SOAP API, you may want to use Savon::SpecHelper to mock requests in your...
After adding a vdisk to an ESXi linux guest you will assert that you can't find a new device...
Datetime picker that offers: simple UI without a specific framework several of customization options allows custom date/time validations Localization happens...
If you're a frequent user of LibreOffice, I strongly recommend to checkout out the VLOOKUP function (SVERWEIS in German...
Small (1.5 KB) Javascript library that lets you render tables, lists, etc. with hundreds of thousands of items.
Jasmine has a jasmine.clock() helper that you can use to travel through time and trigger setTimeout and setInterval callbacks:
You might wonder about this request in your test.log: Started GET "/__identify__" for 127.0.0.1 at 2015-04-29 18:00...
Re-creating a complex ActiveRecord scenario quickly without setting up a full-blown Rails app can come in handy e.g...
Several Rails migration methods accept index: true as an option to create an index. In some cases (like #add_column...
jquery-placeholder is a simple jQuery plugin that enables form placeholders in browsers that do not support them natively, i.e...
There are times when you have a chunk of text that you want to do something with, e.g. replace something...
It is a common misunderstanding that all [op]=-operators work the same way, but actually they don't. ||= and &&=
...default, dmesg shows a timestamp: 12:59:26 fnordomator ~ > dmesg | tail [101925.211846] usb 2-1.1: USB disconnect, device number 16 [110486.855788] usb 2-1.1: new high-speed USB device number...
...fnordomator ~ > dmesg -T | tail [Di Apr 21 12:43:16 2015] usb 2-1.1: USB disconnect, device number 16 [Di Apr 21 15:05:57 2015] usb 2-1.1: new...
You can freeze any Ruby object to prevent further modification. If you freeze an ActiveRecord and try to set an...
Rails comes with a Rake task notes that shows code comments that start with "TODO", "FIXME", or "OPTIMIZE".
In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...
Code folding is a very useful feature to me. It gives me a quick overview over a file and keeps...
# Given the following models class Image < ActiveRecord::Base has_many :album_images has_many :albums, through: :album_images
To use a form model with devise, you can simply override #resource_class in a controller. A typical use case...
List of cloud services and SaaS with a free tier for developers or that are generally free for open source...
Fontawesome 4 ships with many useful CSS helper classes. Enlarge Icon Add fa-lg (133%), fa-2x, fa-3x, fa...
Fontawesome 4 has introduced new naming conventions that make it easy to retrieve variants of a given icon.