How to disable auto-complete on login forms
Browser password managers ignore autocomplete=off on login forms, and disabling autocomplete weakens passwords. Hidden fields can stop saving, but not improve security.
SmartUnderline
Open-source JavaScript library for rendering more readable, visually polished underlines with less awkward line breaks and spacing.
Use Capybara commands inside an IFRAME
Interact with forms and buttons in embedded web pages by switching Capybara into an iframe; the same pattern also works for reusable Cucumber steps.
Faster debugging with RubyMine macros
RubyMine keyboard macros can speed up inserting binding.pry breakpoints and temporary .tap inspection code during Ruby debugging.
ZenTest "invalid gemspec" / "Illformed requirement"
Invalid ZenTest gemspecs can fail with an ill-formed dependency requirement when Rubygems is too old. Updating Rubygems to a newer version resolves the install error.
Copy & Paste & The Web | CSS-Tricks
Controlling copy and paste on the web can improve user flows and enable custom clipboard behavior. Modern JavaScript can trigger copy actions without Flash.
Fix: Capybara is very slow when filling out fields in large forms
Large forms can make Capybara input filling painfully slow because field lookup builds costly XPath queries. A custom fill_in patch can restore usable test speed.
input: A DOM event that is fired whenever a text field changes
input fires while a text field is edited, unlike change, and can replace polling for IE9+; it does not trigger for check boxes.
When should you use DateTime and when should you use Time?
Choosing the wrong Rails date and time type can cause subtle bugs in storage, comparisons, and timezone handling. Time suits most application timestamps; DateTime is for specialized calendar use.
Rails 3 ActiveRecord::Persistence#becomes does not copy changed attributes
ActiveRecord::Base#becomes leaves changed attribute tracking inconsistent, which can break attribute_was checks after casting models with defaults. ActiveType.cast is often the safer alternative.
Rails 4.1+ automatically detects the :inverse_of an association
Rails 4.1 infers association inverses automatically, but failures are silent and extra options can block detection. Setting :inverse_of manually remains safer.
High Performance Browser Networking: HTTP/2
HTTP/2 reduces HTTP/1.1 workarounds and shifts optimization into the transport layer, improving application speed, simplicity, and robustness while enabling new performance gains.
HTTP/2 is here, let's optimize!
HTTP/2 changes long-held optimization rules, making some common performance tricks counterproductive for modern web delivery.
Material icons - Google Design
Google’s icon library offers PNG, SVG and icon font formats, but quality and selection may be weaker than familiar alternatives such as Font Awesome.
Exception Notifier: Foreground vs. background sections
Background jobs can make Exception Notifier crash if foreground settings like request are used, so foreground and background mail sections must be configured separately.
Understanding Ruby Singleton Classes
Ruby singleton classes provide per-object behavior and metaprogramming hooks for adding methods to a single instance or class.
Querying model errors in Rails 4
ActiveModel::Errors behaves like a hash for storing and querying validation messages on model attributes in Rails 4.
Reverse-proxying web applications with Apache 2.4+
Apache 2.4+ can act as a reverse proxy for apps on other hosts or paths, including redirect, cookie, and asset-path rewriting when the backend is not proxy-aware.
Gatekeeping: Guide for gatekeeper
Project code is reviewed before staging to catch client rejections early and keep changes maintainable. Gatekeepers approve or reject merge requests and decide whether a review is needed.
Manually trigger a delegated DOM event
Delegated jQuery events can be hard to fire programmatically for testing; native dispatchEvent with the right event class works better than trigger in many cases.
Show details of TLS/SSL connections of remote hosts
sslscan reports TLS/SSL cipher support and certificate details for remote hosts, helping identify weak protocols, preferred ciphers, and certificate validity.
Upgrading from Capistrano 2 to 3
Capistrano 3 replaces the old DSL with Rake and SSHKit, changing task syntax, hooks, server settings, and file layout during migration from Capistrano 2.
CucumberFactory 1.11 lets you use FactoryGirl traits
CucumberFactory 1.11 adds support for FactoryGirl traits, letting Cucumber steps create records with named variations such as vintage and moody.
Cucumber step to pick a datetime in Rails' horrible datetime_select
datetime_select creates a clumsy date and time chooser in Rails; a visual picker is usually better, but a Cucumber step can still drive it.