Apoorv Tiwari

Apoorv Tiwari

Apoorv is a Ruby on Rails and React Developer.
authorImg Apoorv Tiwari

What is new in Ruby 3.3

Ruby 3.3 boasts performance boosts (faster YJIT, M:N threads), a pure-Ruby JIT compiler (RJIT), a new parser (Prism), developer-friendly features in IRB, and multiple bug fixes.
authorImg Apoorv Tiwari

Performance Gains in Ruby 3.3- String.dup vs. String#+

Ruby 3.3 optimizes String.dup to match the speed of String#+, allowing developers to choose based on preference without sacrificing performance.
authorImg Apoorv Tiwari

Rails 7.1 Introduced Validate Option For Enums

Rails 7.1 added a validate option for enums, which will allow developers to validate the passed enum values before saving it.
authorImg Apoorv Tiwari

Ruby 3.3 fixes duplicate keyword argument warning bug

Ruby 3.3 fixes inconsistent warnings for duplicate keyword arguments
authorImg Apoorv Tiwari

Ruby 3.3 resolves the Range#size bug for rational endpoints

Ruby 3.3 addresses a bug in the Range#size method related to rational endpoints, ensuring accurate counting. Learn how this fix enhances functionality and resolves issues in working with ranges.
authorImg Apoorv Tiwari

Limiting Maximum Index Name Length in Ruby on Rails 7.1

Rails 7.1 defined maximum limit of 62 bytes for auto-generated index names.
authorImg Apoorv Tiwari

Enhancing Security in Ruby on Rails - SSL Enforcement by Default

Rails 7.1 enables force_ssl=true in production by default.
authorImg Apoorv Tiwari

Connecting AWS RDS with an EC2 instance

Connect AWS RDS with an EC2 instance while using Amazon Linux 2023 OS image and MySQL as a database
authorImg Apoorv Tiwari

Breaking changes in Cypress 10.0

Cypress version 10.0 was released last month with a lot of new features, changes, bug fixes, and deprecations.
authorImg Apoorv Tiwari

Cypress 9.3.0 added .selectFile() command to select files

Cypress introduced native support for file upload and selecting files in an HTML5 input element.
authorImg Apoorv Tiwari

Cypress 9.0.0 will throw an error on adding existing commands

Adding an existing command with Cypress.commands.add() will throw an error indicating that overwrite should be used in these situations instead.
authorImg Apoorv Tiwari

cy.pause() now pauses test while running cypress run --headed --no-exit

cy.pause() will not be ignored and pause a test when --headed and --no-exit flags are passed to cypress run.
authorImg Apoorv Tiwari

Cypress 8.6.0 adds overwrite option to cy.screenshot

Cypress introduced the overwrite:true as an option to cy.screenshot() command to overwrite existing screenshots with the same file name.
authorImg Apoorv Tiwari

Cypress version 8.5.0 adds select by index

Cypress introduced the feature to select an option by index within the .select() command.
authorImg Apoorv Tiwari

ECMAScript 2021 introduces Promise.any() and AggregateError

ECMAScript 2021 introduces Promise.any() method which accepts an iterable of promises and waits for the first promise to fulfill, and its result becomes the outcome. If all the passed promises are rejected, it returns an AggregateError.
authorImg Apoorv Tiwari

ECMAScript 2021 introduces replaceAll method and numeric separators

ECMAScript 2021 introduces the replaceAll() method to replace all occurrences of a substring in a string with another string and numeric separators to allow a separator character between digits.
authorImg Apoorv Tiwari

Rails 7 provides context when logging unpermitted parameters

Rails 7 enables passing context to ActionController::Parameters providing more information to the developer.
authorImg Apoorv Tiwari

Rails 7 enables scoping to apply to all queries

Rails 7 allows passing all_queries option to the scoping method. This change allows the scoping method to work on all queries for a model in a block.