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.
Understanding and Implementing Bubble Sort in Ruby
You’ll probably never need to implement bubble sort from scratch. Just call Array#sort! But sorting algorithms are a popular interview topic for a reason. They ask a bigger question: “Sure, you know what your code does, but do you know how it works? Do you understand the subtle ways that choices you make can impact performance?” In this article, Julie Kent will walk us through the famous Bubble Sort algorithm, demonstrating how it works, how to implement it in Ruby, and how to predict its performance.
Introducing Dash, a RoR open source dashboard
Dash: a Ruby on Rails open source dashboard that integrates pull requests and issues from GitHub with Pivotal Tracker stories
AnyCable 1.0: Four years of real-time web with Ruby and Go
It is time to proudly announce the 1.0 release of AnyCable—a drop-in turbo-extension for Action Cable that relies on the same API and also works outside of Rails. As DHH had put it, AnyCable is a “cool open-source project” from Vladimir Dementyev and his fellow Evil Martians that combines the elegance of Ruby API with the performance of Go.
Git Rebase - A Complete Guide
While Git isn’t directly related to Ruby, it is used indirectly. This article on Git Rebase has been several months in the making. The article assembles a comprehensive guide for encouraging a Git Rebase Workflow and becoming a better engineer/communicator in general. Enjoy!
A History of Rails and JavaScript
I got caught up in writing about the many different ways Rails has asked its developers to work with front-end tools. This first part is about the link_to_remote and RJS years. Read it Here. [more inside]
How to handle GDPR in event-sourced applications?
GDPR in event-sourced applications can be tricky. I’ve described how we’ve handled it in our EventStoreClient gem and how the performance is improved in relation to RailsEventStore gem. [more inside]
Mixing variables arguments and variable keyword arguments
rubycademy.com/varargs-vs-kwvarargs
Failsafe.rb
Just wanted to share a a little helper I’ve been using for years to degrade user experience instead of returning “500 - Server Error”: failsafe.rb.
Shared style configs and notes of code-style conventions
This config enforces many of the guidelines outlined in the datarockets Ruby Style Guide.
Automatically keep tracks of outdated gems in a Github Issue
Check new release of your dependencies with a Github Action, base on your Gemfile.
The ancestor chain in Ruby
The ancestor chain is the representation of the class hierarchy in Ruby.
How to Recover from API Downtimes and Errors
APIs are stable, until they aren’t. We talk about that often at Bearer. If you control the APIs, it gets easier, but with third-party APIs and integrations it can be more difficult to predict when an outage or incident is about to happen.
Extract Key or Value From Hash in Ruby on Rails
Want to extract key or value from hash in Ruby on Rails? Here is the tutorial showing the easiest process to extract key or value from hash in detail. Post Link -
graphql_activerecord_autoselect 1.0.0
Automatic ActiveRecord column selection for GraphQL (Ruby) fields.
attr_encrypter 1.0.0
Encrypts/Decrypts, with key rotation, attributes on classes, using RbNaCl (libsodium).
Messages in Ruby
In Ruby, a message consists of a name, usually represented by a symbol, and an optional payload.
Different ways to concatenate strings in Ruby
www.rubycademy.com/fun-facts-6
til-rb a ruby gem to help you manage a GitHub repo of TILs
til-rb is a ruby gem I recently published, it helps you maintain a repo of TILs, inspired from https://github.com/jbranchaud/til [more inside]
Selectively track changes made on your ActiveRecord models.
Hi, i’ve made a gem to selectively track changes on AR models, where audited gem would be an overkill. [more inside]
Build A Saas App in Rails 6 book has launched!
I’ll spare you all the the marketing talk in this description, but the book has launched! [more inside]
More Descriptive Flipping
Flipper 0.18.0 now with new lipstick on a pig and descriptive descriptions. Read more on my blog if you dare:
The Secret Sauce of Hassle-Free SPAs
I’d been a happy Ruby on Rails developer for years when I started playing around with SPAs. Server-rendered HTML with sprinkles of jQuery worked well for most of my projects, but some parts were getting too complex. That’s when my React journey began. [more inside]
HereDocs tokens as method argument
An overview of how to interact with HereDocs as method arguments
Troubleshooting Encoding Errors in Ruby
Text encoding is fundamental to programming. Web sites, user data, and even the code we write are all text. When encoding breaks, it can feel like the floor is falling out from under you. You’re cast into a dimension of bitmasks and codepoints. Logs and backtraces are useless. You consider trading your text editor for a hex editor. But there’s hope! In this article, Jose Manuél will show us how encoding errors happen, how they’re expressed in Ruby, and how to troubleshoot them. So the next time one of these errors lands on your desk, you’ll be in a better position to handle it.