Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example...
If you want to make a screenshot of a website that works well in print or on a high-DPI...
When flagging a spec that will be implemented later as pending, include a failing spec body or RSpec 3 will...
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...
Generating a project README Finally: Support for modelling associations between models in your application model! Example: # lib/katapult/application_model.rb
Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch...
When installing gems, a lot of time is spent building locally installed documentation that you probably never use.
When you have a pending Cucumber step (or feature) that also uses an existing VCR cassette, your pending test may...
Katapult 0.3.0 brings Rails 5 and Ruby 2.5 support with a new design, plus a ton of smaller features, fixes...
Say you want to move a git repository from one remote (perhaps Github) to another (perhaps Gitlab).
If your Rails application is using Webpack you need to serve assets on the same host as you application runs...
This cucumber step is useful for testing an image (looking at the src of the image). Then(/^I should see...
ActiveSupport::Dependencies takes care of auto-loading any classes in development. This is usually useful, but when you run into...
This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...
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 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...