On Chrome, Firefox and modern Safari, document.scrollingElement will return the element. The behavior varies on legacy browsers that we no longer support: Old Safari versions, document.scrollingElement will return...

caniuse.com

All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and...

...all routes, but may return early, a change has been introduced to add lazy behavior by adding an iterator block and yielding. This change breaks the adapter patch in routing...

makandra dev

Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...

Same requests are recorded only once in vcr. Replaying a test fails, if you trigger the same request multiple times...

Action Mailer Basics and Previews Chapter "Task H1: Sending Mail" from Agile Web Development with Rails 7.2 (in our...

If your postgres database is only accessible from inside a kubernetes cluster, e.g. if it's configured in AWS RDS...

docs.gitlab.com

Use rules to include or exclude jobs in pipelines. Rules are evaluated in order until the first match. When a...

You can use nmap to find out what service is running behind a given port, and most often see some details about it. This can be helpful if...

You can run bundle install in parallel. This might be helpful for development, where you often install many new gems...

No out of the box I18n support for translating the database values But: Better support for the enumerated database type and therefore better suited for performance optimizations

makandra dev
rails-sqli.org

This page lists many query methods and options in ActiveRecord which do not sanitize raw SQL arguments and are not...

...in development + test, but keep action_on_unpermitted_parameters = false in production, your application behaves different between these environments. On the other hand it forces to fix these errors in...

...Parameters).to receive(:action_on_unpermitted_parameters).and_return(false) for tests, that should behave exactly like in production...

...file_inside' do let(:path) { '/opt/invoices/' } it 'should send a requested file that lives beneath the given directory' do subject.should_receive(:send_file).with('/opt/invoices/123.pdf', {}) subject.send :send_file_inside, path...

developer.mozilla.org

...methods usually don't print background colors. In most cases this is the desired behavior, because you don't want to spend tons of ink printing the background of a...

If you have content inside a page that is hidden by CSS, the following will work with Selenium, but not...

} Enumerable#index_with (Rails 6+) To generate a hash where array elements become hash keys, and values are calculated from them, use index_with. users = User.all

The attached compiler() function below applies JavaScript behavior to matching HTML elements as they enter the DOM. This works like an Unpoly compiler for apps that don't use Unpoly...

DevOps Curriculum

...Worker Node auch eine Control Plane sein? Kubernetes hat als Feature Self-Healing. Was bedeutet das und wie wird das umgesetzt? Wie kann kontrolliert werden, ob eine Konfigurationsänderung erfolgreich deployed...

...kommunizieren Worker Nodes, wenn sie mit der API von Kubernetes sprechen möchten? Was ist bei selbst gemanagten Kubernetes zu beachten, damit das zuverlässig funktioniert (z.B. wenn eine Node offline geht...

What is a Cookie? Google it if you do not know. How are cookies transferred between your browser and...

...you will sign out your current user whenever you switch to another app. A better way is to use our own daho.im service. All daho.im subdomains resolve to your local...

Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...

Rails 7.1 added the normalizes method which can be used to normalize user input. It lets you define the fields...

makandra Curriculum

Learn Enough Command Line to be Dangerous (it's in our library => Google Drive) CLI tricks every developer should...