Learn to create Ruby Data classes using block syntax and inheritance, and understand their differences and use cases
Learn to create Ruby Data classes using block syntax and inheritance, and understand their differences and use cases
See examples of using Ruby's Data class for creating value objects, removing boilerplate code, and enhancing API response handling
Learn about hash value omission in Ruby, their benefits, examples, and implementation guidelines for more concise code
Quick introduction to the endless method in Ruby, exploring use cases and potential impacts on code structure
Discover Ruby syntax evolving since 2.7
Discover Ruby 3.3's `it` default block param warning, its impact on RSpec, and how to fix potential conflicts. Learn more in my video or article.
Explore Feedbin, an open-source Ruby on Rails platform combining RSS feeds with newsletters so that you can enjoy content on web
Explore inspiring Ruby on Rails projects for businesses, like SaaS, event management, and legal solutions, to unleash your creativity
Explore Chatwoot, an open-source Ruby suite competing with Intercom, Zendesk, Salesforce; boost customer support efficiently
Analyze Ruby Gems download trends (2013-2023), showing rapid growth from 2019, likely linked to CI/CD adoption and Ruby's rising popularity
Explore Zammad: open-source Ruby ticketing system with cloud, custom styling, multiple databases, and service objects on Ruby 3.1.3, Rails 7
Use ActiveRecord::Suppressor, conditional callbacks, or patch ApplicationRecord to skip Rails callbacks.
Practical ideas about how to stay up to date with the newest Ruby and Rails features while also working on your projects.
A bit of (personal) history I learned Ruby, I think, around 2007, and back then, it was a language pushing boundaries for me. Before encountering Ruby, I worked with Java, C/C++...
How to get the class name To get the class name: class User def call = puts self.class.name end User.new.call #=> User This will work even if the name is namespace inside a m...
I will try to explain what a class is in some other way, somehow quoting or paraphrasing in some parts what @steveklabnik said a very long time ago in a presentation about OOP i...
I think learning Ruby has three parts: OOP + SOLID in Ruby Ruby Syntax Idiomatic Ruby What follows assumes you already know how to program in any other programming language...
I read this article about DRY and this prompted me to write some thoughts about this. This was a very debated article about what is DRY and what it means to use it or not and th...
Imagine you are taking part in a coding competition. Let’s explore what it might look like. You found this contest online and registered to participate. On the day of the event,...
How do these things work? Have you ever wondered how the following code works? Specifically, how come the key will have another value than true or false. key = loaded_key || Ke...
I was inspired to write this article by a question asked by Adrian Marin in the Twitter Ruby on Rails community and the responses I read there. https://twitter.com/adrianthedev/...
Context You have a column in your table that is used as an array , like this: t.string 'ids', array: true And you want to select all records that have more than N elements i...
This is more like general advice, but when possible minimize dependencies. I will write the following examples with Ruby gems in mind but could be used in any other programming...
Context You have an array of hashes and want to check if all elements are satisfying a condition. TIL You might want to do this in Ruby: objects.all? { _1[:amount] > 10 } In th...