Delivering Carrierwave attachments to authorized users only

Posted About 3 years ago by Dominic Beger.

To attach files to your records, you will need a new database column representing the filename of the file...

What does 100% mean in CSS?

Posted About 3 years ago by Henning Koch.
wattenberger.com

The attached article examines what the percent unit (%) is relative to in CSS The article does a great job of...

Ruby: How to convert hex color codes to rgb or rgba

Posted About 3 years ago by Arne Hartherz.

When you have a hex color code, you can easily convert it into its RGB values using plain Ruby.

Capybara: Preventing headless Chrome from freezing your test suite

Posted About 3 years ago by Henning Koch.

We prefer to run our end-to-end tests with headless Chrome. While it's a very stable solution overall...

Capybara: Preventing server errors from failing your test

Posted About 3 years ago by Henning Koch.

When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

E-mail deliverability

Posted About 3 years ago by Tobias Kraze.

When your application is open for public sign up and sends out transactional e-mails to a large number of...

Capybara: Pretending to interact with the document

Posted About 3 years ago by Henning Koch.

Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...

The Ruby Object Model

Posted About 3 years ago by Dominic Beger.

In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...

RSpec: How to test the content of a flash message in a request spec

Posted About 3 years ago by Emanuel.

The ActionDispatch module of Rails gives you the helper method flash to access the flash messages in a response.

makandra/capybara-lockstep

Posted About 3 years ago by Henning Koch.
github.com

capybara-lockstep can help you with flaky end-to-end tests: This Ruby gem synchronizes Capybara commands with client-side...

Ruby: Generating and parsing JSON, or: understanding JSON::ParserError "unexpected token"

Posted About 3 years ago by Dominik Schöler.

json is part of the standard library of Ruby and deals with JSON, obviously. As you know, JSON is the...

Webmock < 3.12.1 cannot handle IPv6 addresses correctly

Posted About 3 years ago.

We had the issue, that a VCR spec failed, after updating CarrierWave from version 0.11.0 to 1.3.2. In this version...

Making ZSH the default shell on Ubuntu 20.04

Posted About 3 years ago by Emanuel.

ZSH is an alternative command line shell that includes some features like spelling correction, cd automation, better theme, and plugin...

Too many parallel test processes may amplify flaky tests

Posted About 3 years ago by Henning Koch.

By default parallel_tests will spawn as many test processes as you have CPUs. If you have issues with flaky...

CarrierWave: Default Configuration and Suggested Changes

Posted About 3 years ago by Dominik Schöler.

CarrierWave comes with a set of default configuration options which make sense in most cases. However, you should review these...

Mixed Content Examples

Posted About 3 years ago by Dominik Schöler.
mixedcontentexamples.com

The pages […] allow you to see different types of mixed content and test how they behave in your browser. The...

Rails: Parsing a time in a desired timezone

Posted About 3 years ago by Emanuel.

Sometimes you want to have a time in a given timezone independent from you Rails timezone settings / system timezone. I...

How to fix: WrongScopeError when using rspec_rails with Rails 6.1

Posted About 3 years ago by Florian Leinsinger.

tl;dr: Upgrade the gem to at least 4.0.1 When you use rspec_rails in a version < 4 with Rails...

Running old ImageMagick versions in a Docker container

Posted About 3 years ago by Michael Leimstädtner.

If your project depends on an old version of ImageMagick that you can no longer install in your system, you...

Parallelize Development Using Git Worktrees

Posted About 3 years ago by Julian.

You can use git worktree to manage multiple working trees attached to the same repository. But why should I use...

Regular Expressions: Quantifier modes

Posted About 3 years ago by Henning Koch.

When you repeat a subpattern with a *, + or {...} operator, you may choose between greedy, lazy and possessive modes. Switching modes...

How to list updateable dependencies with Bundler and Yarn

Posted About 3 years ago by Michael Leimstädtner.

bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples

Some tips for upgrading Bootstrap from 3 to 4

Posted About 3 years ago by Florian Leinsinger.
getbootstrap.com

Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...

WYSIWYG with Action Text

Posted About 3 years ago by Niklas Hasselmeyer.

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...