Weekly Digest #1 : Generate authentication like Rails 8 will
Curated and handpicked Ruby on Rails blogs.
Introduction
👋 friends, I have decided to start this newsletter after almost working for more than 1 year on Ruby On Rails. Before that, I have spent almost 6 years in coding Java.
Here is my LinkedIn if you want to connect with me.
My goal with this newsletter is to publish a weekly digest where I list interesting articles that published recently. In addition to that I am planning to post regular content from what I learn and think might be worth sharing with others from my day job. Let’s do this! I am excited and I hope others are too!
In this first issue, I have picked 10 interesting articles published last week that I feel are worth reading. I hope you will like it.
1. Generate authentication like Rails 8 will
Rails 7 lacks a default authentication method, unlike Laravel in the PHP world. The Devise gem was a good starting point but didn't reach 100% adoption due to Reddit-debated reasons. The authentication-zero gem is the closest solution so far, offering a clean, elegant, and customizable solution. Once the Rails 8 authenticator is out it will become the default authentication method.
2. Prevent Logging Sensitive Data with Rails Parameter Filters
This article discusses the importance of not logging sensitive or user-identifiable information in Rails and how to filter it using parameter filtering. Logging sensitive data, such as passwords and credit card numbers, is a common way to leak sensitive information accidentally. To prevent this, Rails allows you to filter certain sensitive information from leaking into the logs.
3. Rails/ActiveStorage: Client-Side encryption with Amazon S3 & dynamic service switching
In this article, the authors discuss the implementation of client-side encryption for ActiveStorage, a requirement due to FISA and Schrems II GDPR rulings. They provide a detailed guide on how to best implement this with ActiveStorage, including the use of AWS Ruby SDK and the implementation of the new AWS::S3::EncryptionV2 interface
4. Exceptional creatures
The Exceptional Creatures website provides a fantasy world where exceptions are mischievous monsters plotting to cause chaos in our applications. The site is organized into Guides, a catalog of Ruby exceptions, and The Bestiary, a catalog of each exception type.
5. Supporting Dragonfly
Redis has been the dominant choice for background job infrastructure in Ruby for 15 years, with Sidekiq adopting it as a pragmatic choice. However, Dragonfly, a Redis-compatible tool, offers new capabilities and competition. Dragonfly is faster than Redis due to its multi-core capabilities and can peg multiple cores while handing out hundreds of thousands of jobs per second to a Sidekiq cluster.
6. Indexing in Ruby on Rails with PostgreSQL
Ruby on Rails (RoR) is a popular web application development framework that enhances performance and scalability when paired with PostgreSQL, a robust and scalable database system. The author discusses efficient indexing which is crucial for optimizing the performance of RoR applications that interact with databases.
7. The link_to helper in Rails
The link_to helper in Rails creates an anchor element with a given URL and options. It can be used in various ways, such as creating simple links, specifying URL parameters, passing an object, displaying the whole URL, adding an icon, and using HTML attributes. The author disscusses these in detail.
8. Upsert no longer ignores on_duplicate if unique_by is specified
ActiveRecord querying has improved with the introduction of Arel and the ability to chain methods. One such method is upsert, which allows to insert or update records if found.
9. The Top 5 Scaling Issues for Ruby on Rails Applications
Ruby on Rails, a popular web framework, has been the backbone of many successful web applications. However, as applications grow, scaling becomes a critical challenge. The author explores the top five scaling issues Ruby on Rails applications face and offers insights into navigating these challenges.
10. Database Performance and Scaling Issues in Ruby on Rails with PostgreSQL
Ruby on Rails is a popular web application framework written in Ruby, known for its ease of use and speed. However, it faces challenges in database performance and scaling. PostgreSQL is a commonly used database with Rails applications due to its robustness and advanced features. The author discusses database performance opportunities along with their challenges.
11. The 3 pillars of AAA
The three pillars of AAA in security are Authentication, Authorization, and Accountability. The author touches on them in the context of the Ruby on Rails application.
Resources ( Affiliated )
Upgrade SQL skills by practicing it.(Use discount code: ABNEW20OFF for 20% off )
That’s a wrap for this week. If you have any feedback, requests, or improvements for this newsletter consider commenting so that we can work on improvements for the next one.