Probably was in the repository once and got deleted in a commit that you pulled.
If you encounter the error message above when running cucumber, just execute... rm rerun.txt ...in the Rails directory.
As far as I know, the only plugin out there that handles this (semantic issue) correctly is Makandra’s Aegis...
To test whether two arrays have the same elements regardless of order, you can use the =~ matcher in RSpec < 2.11...
...model can either hold a concrete owner class (like. e.g. User) or a polymorphic belongs_to or multiple optional belongs_to associations. class CreateBlobOwnerships < ActiveRecord::Migration[7.2] def change
...false, foreign_key: true, index: true t.timestamps end end end # app/models/blob_ownership.rb class BlobOwnership < ApplicationRecord belongs_to :active_storage_blob, class_name: 'ActiveStorage::Blob' belongs_to :user end class CustomDirectUploadsController < ActiveStorage...
...but review your final commit before pushing. Look out for changes that don't belong to your issue (and are usually in place you never touched) when you open a...
...is already present in the gem. Try to write your code so that everyone believes it has been there from the beginning. When adding files, you need to require them...
...yourself. Look around how similar files are being required, and try to find the best spot. Your last resort is lib/$gem_name.rb. One thing to keep in mind is that...
...is being validated. This way they will be right next to defaults and other behavior for that method: describe Report do describe '#currency' do it { is_expected.to allow_values('EUR', 'USD...
...squash these small commits to meaningful, bigger ones. When merging into master it's better to have only few (or maybe just one!) commits. Each of them should have a...
...made within the transaction are rolled back and the exception is re-raised. To better understand how ActiveRecord handles exceptions within a transaction, here is the implementation of ActiveRecord::Base...
...above has all the issues that the transaction-less copy_invoice example at the beginning of this article had. In addition, it might lose money transactions.
# => 3 "foo".class # => String "foo".html_safe.length # => 3 "foo".html_safe.class # => ActiveSupport::SafeBuffer The behavior of SafeBuffer differs from a String in one way only: When you append a String...
...if it is safe. To achieve this we can simply use SafeBuffer's concatenation behavior: # ✔️ Safe def group(content) html = "".html_safe html << " ".html_safe html << content html << " ".html_safe...
Do­nau­dampf­schiff­fahrt Caveat: Unexpected copy & paste behavior Note that when copying a text with soft hyphens, the soft hyphen character will be...
We recommend configuring Selenium's unhandled prompt behavior to { default: 'ignore' }. When running tests in a real browser, we use Selenium. Each browser is controlled by a specific...
...when performing most options, like a simple visit or execute_script from Capybara. Different behaviors While drivers default to dismissing user prompts, you can change that. Specifically, the specification describes...
Before any technical considerations, you need to understand the old system as best as possible. If feasible, do not only look at its API, or database, or frontend...
"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...
When working with custom transactions and use ActiveRecord::Rollback you may encounter unexpected behaviour if you try to roll back your changes. tl;dr When using nested transactions, ActiveRecord::Rollback...
...only roll back the inner, but not the outer transaction. You can fix this behavior by using transaction(joinable: false) but this leads to a bunch of different problems.
...used for case-equality. In general it tells if the object on the right "belongs to" or "is a member of" the object on the left: String === "hello" # true
...to work, and SameSite=Lax (new Chrome default, gradually rolled out) is an even better default for cookies. Set SameSite=Strict only for extra security in special cases (see below...
...same site, from the page or from an iframe. This is how cookies have behaved the last decades. SameSite=Lax Only send the cookie in a first-party context (meaning...
t.string :title t.references :user t.timestamps end end end class Task < ApplicationRecord belongs_to :user validates :title, presence: true end class User < ApplicationRecord has_many :tasks accepts_nested...
for (let element of clone.querySelectorAll('[name]')) { element.name = element.name.replace(NESTED_NAME, uid) } template.insertAdjacentElement('beforebegin', anchor) anchor.appendChild(clone) } up.compiler('[nested-records]', function(container) { const template = container.querySelector('[nested-records--template]')
If you want to prevent that two processes run some code at the same time you can use the gem...
Notes compare writes it's result to STDERR. A lower score is better, I'd test for a threshold like <= 5. There are different comparison metrics available
...ETags. These ETags will never match what your application sees. You can disable this behavior through this directive: DeflateAlterETag NoChange
...styles from the document. See Styling a Web Component for this case. Applying JavaScript behavior to new elements All client-side JavaScript frameworks comes with mechanisms to activate JavaScript behavior...
...a framework mechanism you may use customElements.define() to register your custom element's JavaScript behavior with the browser directly. A big advantage of using the browser's customElements.define() is that...
...s to toggle the screen reader. Note It may feel quite strange in the beginning to use a screen reader. It is constantly commenting on everything you do and every...
Handling I have noticed, while testing my application, that the screen reader sometimes behaves a bit weirdly if you are using the mouse to navigate the page. It would...