MySQL and MariaDB have an SQL mode setting which changes how MySQL behaves. The SQL mode value is comprised of...

On your local system that only hosts non-critical development data and only you have access to, you can store...

You need to update a lof gems. Make sure you don't have any version constraints in your...

Running rails server will start a local server that you can access via http://localhost:3000. When you are working...

stackoverflow.com

Your default postgres user is named like your linux user. That default user has limited access privileges, which can cause...

stackoverflow.com

mysql> SELECT @@global.version; +------------------+ | @@global.version | +------------------+ | 5.6.30 | +------------------+ 1 row in set (0,00 sec) MySQL 5.6 Reference Manual says "BLOB and TEXT...

guides.rubyonrails.org

When your Rails controller calls render, you can pass a :status option for the HTTP status code: render 'results', status...

makandra dev

When a Rails controller action should handle both HTML and JSON responses, do not use request.xhr? to decide that. Use...

I recently had fun with replacing a custom video plattform ("mycustomtv") in one of our applications. I learned a lot...

Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch...

When you have a pending Cucumber step (or feature) that also uses an existing VCR cassette, your pending test may...

makandra dev

ActiveSupport::Dependencies takes care of auto-loading any classes in development. This is usually useful, but when you run into...

makandra dev
fontawesome.com

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...

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...

github.com

The issue: You are using stub_const to change a constant value for your test. stub_const "SomeClass::CONST", 'test...

blog.bigbinary.com

This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.

makandra dev
makandracards.com

Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...

You should avoid using application models in your migrations. But how else could you create records in a migration?

Situation: You want to write a spec for a function inside an Angular service. This function at some point makes...

By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...

makandra dev

Git has two kind of tags: annotated lightweight Annotated tags are stored as full objects in the Git database. They...

georgemauer.net

If your application exports CSV, be advised that Excel and other spreadsheet applications treat certain cells (those starting with =, +, - or...