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...
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 so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences:
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...
ActiveType::Object inherits from ActiveRecod::Base and is designed to behave like an ActiveRecord Object, just without the database...
tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...
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.
You have uncommited changes (you can always check by using git status), which you want to discard.
The robots.txt file and HTML tag can be used to control the behavior of search engine crawlers. Both have different...
Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...
If you want to see the git history of a project file, that doesn't exist anymore, the normal git...
Resolve @{-1} to actual branch name. (Happens when merging "-".)
Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...
When working with feature branches, stale branches pile up over time. It's best to remove them right after merge...
Note Use yarn dedupe in Yarn v2+: https://yarnpkg.com/cli/dedupe This package only works with Yarn v1. Yarn v2 supports...