makandra dev
thoughtbot.com

One of the earliest pieces of wisdom we are given as programmers is to not write duplicate code: Don’t...

Ruby and Rails have several methods for creating a new object that looks like another: clone, dup, deep_dup. When...

You can run bundle install in parallel. This might be helpful for development, where you often install many new gems...

millarian.com

In Active Record you can use named bindings in where-conditions. This helps you to make your code more readable...

When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...

We can use ActiveRecord's where to add conditions to a relation. But sometimes our condition is not on the...

To set a default Node version for new shells, use nvm alias default : nvm alias default 1.2.3

makandra dev

Or: How to avoid and refactor spaghetti code Please note that I tried to keep the examples small. The effects...

Before you continue, ensure that you've created your certificate in the region us-east-1 (N. Virginia). Otherwise...

This checklist should help you to check edge cases that are not part of the default Carrierwave configuration.

Debugging image color profiles is hard. You can't trust your eyes in this matter, as the image rendering depends...

Browsers come with a set of built-in elements like or . When we need a new component not covered by...

When restoring a barman PITR backup you may encounter this error: Copying required WAL segments. EXCEPTION: {'ret': 2, 'err': '/bin/sh...

Install the latest bundler version: gem install bundler Fetching bundler-2.3.5.gem Successfully installed bundler-2.3.5 1 gem installed Update the bundler...

api.rubyonrails.org

ActiveSupport (since 4.1) includes test helpers to manipulate time, just like the Timecop gem: To freeze the current time, use...

Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...

gedd.ski

Within a Flexbox layout, there are multiple CSS attributes that may affect a child's basis (the initial width before...

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...

When a user shares your content, a snippet with title, image, link and description appears in her timeline. By default...

You can share a state in Ruby with global variables. Even if you should avoid them whenever possible, for debugging...

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...

RubyMine comes with a nice way to grep through your project's files: The finder (ctrl + shift + f). Don't...

Jasmine has long standing support for writing asynchronous specs. In days gone by we used the done callback to achieve...

With ActiveType 1.2 you can modify associations (has_many etc.) after they have been defined. One common use case for...