...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...
There's a method Integer() defined on Kernel, that typecasts everything into an Integer. Integer("2") # 2 Integer("foo") # Invalid...
Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...
All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and...
Tested on Ubunut 22.04 1. Opener script Create a file ~/.local/bin/coverage_zip_opener with: #!/bin/bash tmp_folder="/tmp/coverage-report-opener" if [ -z "$1" ]
We structure our CSS using the BEM pattern. Our naming convention for blocks, elements and modifiers has evolved over the years. This card shows our current style and various alternative...
...not mix styles and be consistent within a given project. Current convention Our current BEM naming convention looks like this:
Note how the modifier just starts with a dash (-pro...
Although you can access many symbols using the AltGr key you may be missing some, like the en-dash (–) or...
Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...
Use rules to include or exclude jobs in pipelines. Rules are evaluated in order until the first match. When a...
Let the following setup: # my_model_spec.rb describe MyModel do it 'perfoms a test' it_behaves_like 'something shared' end # something_shared.rb shared_examples_for 'something shared' do it 'does something'
...a test' is spec/models/my_model_spec.rb[1:1]. The ID of the ExampleGroup created by it_behaves_like 'something shared' is spec/models/my_model_spec.rb[1:2] as it is the second ExampleGroup in the...
If your postgres database is only accessible from inside a kubernetes cluster, e.g. if it's configured in AWS RDS...
=> #<Capybara::Node::Element tag="div" path=... If you rely on this behavior in Capybara 3, affected features will fail. The gem no longer normalizes whitespace when finding...
...visible css ".haystack" with text "Hi! Try to match me." Re-enabling Cabyara 2 behavior in Capybara 3 After digging in the documentation, you might figure out that you can...
You can run bundle install in parallel. This might be helpful for development, where you often install many new gems...
I had to modify the time for an application that I launch through Docker. Here is an approach that worked...
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
...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...
Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...
...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...
You can not use the hash_including argument matcher with a nested hash: describe 'user' do let(:user) { {id: 1...
What is a Cookie? Google it if you do not know. How are cookies transferred between your browser and...
When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...
Modern CSS offers the field-sizing property to allow elements to automatically adjust size (width and/or height) to fit their...
...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...
When using Sidekiq in your application, you must write thread-safe code. This wiki page also lists gems that are...