This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...
About-Payments is here to help you to accept payments online and find the best payment service provider for your...
Font Awesome version 5 changed some icon names, and introduces new prefixes fab, far, and fas. There is a JavaScript...
TL;DR Use user.update!(remove_avatar: true) to delete attachments outside of forms. This will have the same behavior as...
To check which elements an ActiveRecord relation contains use the contain_exactly matcher. describe User do let!(:admin) { create(:user...
This article will show you how to use throw and catch. It's a nice tool to break out of...
This is a small example on how you can check if your Postgres index can be used by a specific...
This is painful. Consider using Microsoft Office or switching careers. If you need to write < 20 letters consider doing it...
The issue: You are using stub_const to change a constant value for your test. stub_const "SomeClass::CONST", 'test...
This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.
Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...
To find and replace (CTRL + H) empty cells in Libre Office Calc you can use a regular expressions (also called...
When making requests using curl, no cookies are sent or stored by default. However, you can tell curl to re...
You should avoid using application models in your migrations. But how else could you create records in a migration?
wrap the text with a span use line-height for the spacing between lines ("margin")
To check if a method has been called in Jasmine, you first need to spy on it: let spy = spyOn...
When you print (or print preview) and elements are cut off (e.g. after 1st page, or "randomly") you should check...
Situation: You want to write a spec for a function inside an Angular service. This function at some point makes...
If you try to listen to events on elements that are nested inside a , Firefox will stop event propagation once...
By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...
HTTPie consists of a single http command designed for painless debugging and interaction with HTTP servers, RESTful APIs, and web...
When writing XLSX files, there are gems like rubyXL or axlsx. While they do offer features like formatting or graphs...
PostgreSQL's Common Table Expressions (CTEs) can be used to extract sub-queries from bulky SQL statements into a temporary...
PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02...