I recently noticed that better_errors allows you to to open files from within your favorite editor. However it was...

When you allow file uploads in your app, a user might upload content that hurts other users. Our primary concern...

Every Rails response has a default ETag header. In theory this would enable caching for multiple requests to the same...

tl;dr asdf allows you to manage multiple runtime versions with a single CLI tool and is backwards compatible by...

Capybara has a variety of finder methods like find_button to help you look up DOM elements. There are also...

ruby-doc.org

We will achieve this by creating a block accepting method to optionally create and then lock a .lock File of...

If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...

makandra dev

This is a checklist I use to work on issues. For this purpose I extracted several cards related to the...

Not all email clients support external images in all situations, e.g. an image within a link. In some cases, a...

Carrierwave's BaseUploader can have some validations that you can use by overriding a certain method, which's expected name...

Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...

In Rails 5+ you can access a helper from a controller using the helpers method: # Inside a controller action

After upgrading to Rails 6.1.7.2 one of our apps printed a wall of warnings while booting: /var/www/app/shared/bundle/ruby/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: already...

phili.pe

The linked article found a simple way to rewrite legacy git aliases to make them work with differently named default...

I recently enjoyed debugging a Cucumber step that tried to be retryable using a patiently block: Then /^"([^"]*)" should( not)? be...

bundler.io

Bundler so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences:

makandra dev

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...

We usually rely on VCR and WebMock to prevent any real network connection when running our unit tests.

This can happen with a very simple model: class Note has_many :attachments end Everything looks normal: Note.all.to_a.size # => 8 Note.all.ids.size...

Git allows you to set push options when pushing a branch to the remote. You can use this to build...

github.com

ActiveType::Object inherits from ActiveRecod::Base and is designed to behave like an ActiveRecord Object, just without the database...

makandra dev

tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...

makandra dev

tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...

New versions of wkhtmltopdf dissallow file:// URLs by default. You can allow them by passing --enable-local-file-access.