In this post I will share with you the 7 most common reasons for Flaky tests in Ruby on Rails, but before I start, let me define what a flaky test is to ensure that we are all on the same page. What are flaky tests? As a developer there is probably nothing more annoying [ ] The post The 7 most common reasons for having Flaky tests in Ruby on Rails appeared first on Alberto Almagro .
What is TDD? TDD, or Test Driven Development, is a software development process composed of three phases. These three phases work in incremental cycles until the functionality is ready. How does TDD work? Let s describe how the TDD cycle would work to code a complex functionality. You would start the cycle by first adding a [ ] The post TDD in Ruby on Rails made easy appeared first on Alberto…
Modifying the database schema used to be one of the most complicated tasks a software developer had to do back in the day. Thankfully ActiveRecord migrations simplified this a lot. However, even with this great tool, you need to learn how to use it properly. If you do not, there are still some scenarios in [ ] The post How to do migrations with confidence in Ruby on Rails appeared first on Alberto…
In the Ruby community there is the convention of adding tests whenever you do some changes to the code base. This is really awesome. Unfortunately it is not the same in other communities. In my experience doing technical due diligences of start ups this is a common weak point I usually find. Finally I must [ ] The post My strategy to add tests to an application if you are on a budget appeared…
Rails is a web framework, but it does much more than only handling user facing web requests. There is also a background side of the framework: background jobs. Don t believe me? Stay with me! In this post you will learn: What are Background jobs. When should you use Background jobs in a Rails project Best [ ] The post Learn how to use Background jobs in Ruby on Rails right appeared first on…
Rails Helpers typically are a source of confusion for new and not that new Rails developers. One of the most common questions I get is what kind of code should go into the app/helpers/ folder? In todays post you will learn how should you use helpers and you will see them in action with a [ ] The post Rails helpers: how to use them right appeared first on Alberto Almagro .
One of the most relevant new features shipped with Rails 7 is Active Record Encryption. Active Record Encryption helps to preserve your application s data confidentiality by adding reversible application-level encryption in a way that you can encrypt, decrypt and do searches on that data. Advantages of Active Record Encryption Active Record Encryption makes encryption transparent [ ] The post How…
Persisting passwords in plain text does not seem to be a very good idea. If for any reason an attacker manages to get access to your database they would be able to see all your users passwords without any restriction, giving them the possibility to authenticate as your users and as you know, despite of [ ] The post Persisting encrypted passwords in Rails with has_secure_password appeared first on…
Your application should be focused on serving productive traffic to your users. Unfortunately not all the traffic you get has good intentions. Sometimes you need to block and throttle malicious requests to your Rails app. In today s post you will learn how you can easily protect your Ruby on Rails application from the bad guys. [ ] The post Rack::Attack! Block and throttle abusive requests in…
Today s post is an excerpt from a tutorial I am creating about Rails API development that I hope to have available soon. I hope you enjoy it and find it useful! Many times you might have heard about programming languages supporting multiple inheritance but is Ruby one of them? Before I answer that question let [ ] The post Does Ruby have multiple inheritance? appeared first on Alberto Almagro .