When internationalizing your Rails app, you'll be replacing strings like 'Please enter your name' with t('.name_prompt'). You...
Rails includes a way to see what an e-mail will look like. Integration to RSpec All you need to...
Sometimes you want to fetch associations for an ActiveRecord that you already loaded, e.g. when it has deeply nested associations...
Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...
before(:all) runs the block once before all of the examples. before(:each) runs the block once before each...
...the file system. Since load order can be important, this may lead to different behavior on different machines which are hard to debug. Simply add a .sort: Dir.glob(Rails.root.join('lib/ext...
In the discussion of the difference between include and extend in Ruby, there is a misconception that extend would add...
PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...
...often show or hide elements based on viewport dimensions, or may have components that behave differently (like mobile vs desktop navigation menus). Since you want your integration tests to behave...
...metrics". This allows you to configure dimensions larger than your display and enable/disable touch behavior. Simply use register_driver to set up a driver that you then connect to Capybara...
When your Rails application offers downloading a bunch of files as ZIP archive, you basically have two options:
The linked tool can be used to scan your CI/CD workflows for potential security issues and suboptimal defaults if they...
While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...
In general, you should not put a block element inside an inline element. So don't do this: text
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...
It's possible to implement simple custom RuboCop cops with very little code. They work exactly the same like existing...
This Capistrano task runs a command on all servers. bundle exec cap production app:run cmd='zgrep -P "..." RAILS_ROOT/log/production.log...
When using Rails credentials, you will edit the encrypted credentials for staging or production environments from time to time. To...
I recently built a screen with a very high and wide table in the center. This posed some challenges:
This card describes different flavors for concatting HTML safe strings in a helper method in Rails. You might want to...
Most of our applications use CarrierWave for file uploads. CarrierWave has an integrated processing mechanism for different file versions with...
Text fragments allow linking directly to a specific portion of text in a web document, without requiring the author to...
Creating records in specs can be so fast that two records created instantly after one another might have the same...
When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...
bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples