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...
Because colors improve readability so much. On Ubuntu 18.04 you can install it with sudo apt install grc
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
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...
ActiveSupport (since 4.1) includes test helpers to manipulate time, just like the Timecop gem: To travel a relative amount of...
This is a bookmarklet you can add to Chrome or Firefox which will allow you to create a story in...
Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...
There is an issue with when restoring a PostgreSQL dump created with pg_dump < v11 with pg_restore > v10:
You can use constraints in your routes.rb to avoid getting errors when wrong routes are called. Instead, the user will...
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...
webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...
RubyMine comes with a nice way to grep through your project's files: The finder (ctrl + shift + f). Don't...