The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Build your own decorator - 3 times faster than Draper, 60% fewer objects allocated
Using Draper gem for simple decoration in your Rails application? You can easily build your own solution which will be a better fit. READ MORE
Awesome Types & Type Signatures / Annotations for Ruby
Hello, I’ve started to put together a new awesome page collection about all things types, type signatures / annotations and more for ruby - incl. bool, bytes, buffer, enum, flag, record, data and more. Is static the new dynamic? Happy coding with ruby with types.
Rails 6 allows to override the ActiveModel::Errors#full_message format
Rails 6 allows to override the ActiveModel::Errors#full_message format at the model level and at the attribute level -
FactoryBot Tips
FactoryBot Tips article to provide a few guidelines I think about when creating factories to avoid test data from becoming messy and fragile.
Types & Type Signatures (for Ruby) Incl. Bool, Enums, Flags, Records, and More
Hello, I’ve started a new org that collects types and type signatures (typesigs) for ruby including Bool, Enum / Flag, Record, Data, and more. Note: Most gems / libraries are zero-dependency and, thus, can get used on its own / standalone. Happy coding with ruby (with more types). PS: Yes, the gem / libraries moved from the (secure) ruby org.
rspec-benchmark adds objects and memory expectation
The latest rspec-benchmark adds a flexible expectation for testing objects and memory usage. It also adds the ability to configure global options such as the number of samples for perform_under and computational complexity matchers. Happy safe hacking!
Use Event emitter in Ruby
Just an article about using Event emitter and how to implement it. [more inside]
‘Cody the game’… A story of the special game for Ruby programmers
One day 3 years ago in the Codest team we prepared a great Cody game for Ruby programmers. In today’s article, I would like to describe what the work on this project looked like and above all show you the code of the project, which from now on is publicly available on our github. Read more:
Programming Bits, Bytes 'n' Blocks (in Ruby) Step-by-Step Book / Guide
Hello, I’ve started a new (free online) book(let) titled “Programming Bits, Bytes ‘n’ Blocks (in Ruby) Step-by-Step Book / Guide”. Let’s start with the three types of strings, that is, bytes, (string) buffers, and (frozen) strings, … Ruby Trivia Question: What’s the difference between 1) String.new, 2) String.new(""), and 3) "" ?. Happy bits & bytes slicing & dicing with ruby.
Introduction to Rails patterns - free book
I created a free book for you, it’s called “Introduction to Rails patterns” and it covers over 50 pages of useful refactoring tips. You can get it here
[Screencast] Interview with Frank Rietta about Security
In this interview, Frank Rietta, a security expert in web applications, talks about various recommendations for securing a Ruby on Rails application. Many areas are explored from code, staff, servers and infrastructure. https://www.driftingruby.com/episodes/interview-with-frank-rietta
How to learn Ruby on Rails effectively
I wrote an article about my tips for people wanting to squeeze as much as possible from the time to learn web development. [more inside]
Screencast - Sublime Text Mouse-Free Development Advanced Productivity Tips
Sublime Text is my editor of choice for developing Ruby on Rails and JavaScript web apps. In this screencast, I present a couple of more advanced productivity tips and configs that let you minimize the usage of mouse during development. [more inside]
Validate and Fix Ruby on Rails ActiveRecord PostgreSQL Data Integrity
Most Ruby developers work with Rails and Active Record for PostgreSQL database interactions. It provides a ton of magic and is simple to start with. Data integrity problems start creeping up once the code base and database structure gets older. In this blog post, I will describe a couple of techniques for ensuring data integrity and validation in Ruby on Rails web apps. [more inside]
Assigning methods to objects in Ruby
A pair posts talking about (the fairly often blogged about) Singleton Classes, without actually starting with Singleton Classes. [more inside]
Secure Configs with AWS SSM Parameter Store and Rails on Lambda
A cloud-native approach to Rails secrets management using AWS Lambda.
Image Processing with Libvips, AWS Lambda, & Rails
Just released an simple way to use popular gems like ruby-vips or image_processing with AWS Lambda layers and Rails. https://github.com/customink/ruby-vips-lambda and https://github.com/customink/lamby
Processing text files in Ruby simultaneously
This post analyzes different approaches for processing multiple files simultaneously with Ruby.