Don't define a controller action called #process
Controller actions can accidentally overwrite internal ActionController::Base methods such as process, causing bizarre behavior and ArgumentError failures when middleware calls them.
Improve accessibility with [aria-required] in SimpleForm
Screen readers can miss required fields when forms rely only on visual asterisks; aria-required adds an accessible required-state announcement without browser validation.
RSpec: Marking sections in long examples
Long RSpec examples are hard to scan and slow to report progress. A small STEP helper adds semantic section markers and clearer test output.
How to silence Puma for your feature tests
Feature specs can print noisy Puma startup logs when Capybara launches the test server. Setting Capybara.server = :puma, { Silent: true } suppresses the output.
How to use Ubuntu in English, but still show German formats
Keep Ubuntu in English while displaying dates, money, paper sizes and other regional formats in German by setting mixed locale variables.
Git: Rebasing dependent feature branches
Dependent feature branches need an explicit git rebase --onto after the base branch is squashed, or Git may replay already-merged commits and cause conflicts.
RSpec: Defining helper methods for an example group
Helper methods can be defined inside an RSpec example group and inherited by nested groups, but not by parent or sibling groups.
How to define a table prefix for all Rails models in a namespace
Rails namespaces can produce doubled table prefixes when table_name_prefix is set on individual models. Defining it on the namespace module keeps nested model table names correct.
How to find out what is running on a port on a remote machine
Remote ports can hide unexpected services, and nmap can identify the daemon and version behind a TCP port. Useful when a server exposes the wrong service or response.
RSpec Argument Matchers: Expecting non-primitive objects as method invocation arguments
RSpec can verify method arguments that are objects by class, interface, attributes, equality, or custom block checks instead of simple primitive values.
Managing chrome versions for selenium
Browser and driver mismatches can break Selenium tests; Selenium Manager can fetch matching Chrome and chromedriver versions automatically, though the first run is slower.
Webpack(er): Analyze the size of your JavaScript components
Keep JavaScript bundles small with webpack-bundle-analyzer, which visualizes module size and highlights large chunks before production.
Custom error pages in Rails
Custom Rails error pages can be rendered through controllers instead of static public files, allowing layouts, helpers, and tests for 404 and 500 responses.
Don't forget: Automatically remove join records on has_many :through associations
has_many :through associations can leave orphaned join rows after deleting a parent record. dependent: :destroy removes the join records while keeping the associated records.
Rails: Handling actions that need to happen after all transactions
ActiveRecord.after_all_transactions_commit runs work only after every open transaction commits, or immediately when none is open. It suits side effects like email delivery after persisted state changes.
Rails: Testing exceptions with the rescue_responses setting
Rails 7.2 changes show_exceptions defaults in tests, so rescued RecordNotFound often becomes a 404 response instead of a raised exception.
RSpec: Defining negated matchers
RSpec::Matchers.define_negated_matcher creates readable inverse matchers for composed expectations and clearer failure messages, but only for atomic matchers with unambiguous negation.
A modern approach to SVG icons
SVG icons can be sized and colored like text without image tags, icon fonts, or extra server work by using CSS masking.
Regex: Be careful when trying to match the start and/or end of a text
Regular expressions can accept embedded newlines when ^ and $ are used; \A and \z anchor the whole string and avoid unsafe validation matches.
Statistics and Reports on Web Performance Optimization
Web performance optimization affects user experience and business metrics, with case studies and experiments showing measurable gains from faster sites.
How to use Parallel to speed up building the same html partial multiple times (for different data)
Parallel rendering can speed up repeated partials for long lists, but database connections must be cleaned up and transaction-based test setup may break.
Choosing the right gems for your project
External libraries add maintenance and security risk, so picking a Ruby gem needs attention to necessity, test quality, license, maturity, and scope fit.
How to iterate over an Enumerable, returning the first truthy result of a block ("map-find")
Need the first derived value from a collection without mapping everything twice; Ruby can do it in one pass with break or lazy filter_map.
Heads up: Capybara 3's text matchers no longer squish whitespace by default
Capybara 3 no longer squishes whitespace when matching text across elements, so tests that relied on rendered text comparison can fail unless normalization is enabled.