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.
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.
Introducing UndercoverCI
A GitHub code review app that analyses pull requests and finds untested methods you’ve changed:
Advanced Active Record: Using Subqueries in Rails
Real-life examples of business needs translated first into SQL, then into the Rails code necessary to find those records: Advanced Active Record: Using Subqueries in Rails
Multiple Foreign Keys for the same relationship in Rails 6
Here I shared my experience with personalized migrations [more inside]
Heredoc tokens as method parameter
rubycademy.com/heredoc-tokens-as-method-arguments