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.
Ruby 2.7's "pattern assignment" reads like a charm
[1, 2, 3, 4] in [first, second, *other] # Puts 1, 2, [3, 4] into variables called first, second and other!
Unlearn programming to learn Ruby
In most programming languages, the language is seen as an intermediary between the machine and the developer. In Ruby, the language is.. READ MORE
How to Improve ActiveRecord Query Performance with Subquery Caching
Slow database queries are a common performance bottleneck for Ruby on Rails apps. Simplifying a complex query is often not possible due to the underlying business logic. Instead, you can extract parts of a query, cache and reuse them to improve performance. In this tutorial, I’ll describe a range of techniques on how to do it. [more inside]
Noticed - Notifications for Rails apps
Noticed is a notifications library for Rails that allows you to easily deliver notifications to users via database, email, ActionCable, and other delivery methods. Check out Noticed on Github
Chaskiq 0.3.0 release 🎉
What has happened in the open source chat platform’s Chaskiq project during these 3 months? Version 0.3.0 is out! [more inside]
Ruby 3.0 changes autosplatting behaviour for procs
The behavior for autosplatting was inconsistent when an input is passed to procs with rest argument and keyword arguments vs when the same input is passed to procs with only rest argument. [more inside]
render_async 2.1.7 Lets You Retry Requests With Delay
Check out new features in the render_async 2.1.7 version! [more inside]
A visual guide to Webpacker
Navigate the world of Webpacker and webpack on Rails with confidence using this collection of mental maps.
[Screencast] Apple Silicon Developer Transition Kit
First look at the upcoming Apple Silicon processor and what it will be like for us Ruby Developers. Honestly, I wish that it was a better experience. However, with macOS Big Sur being beta and the DTK not being the final consumer hardware, there’s still hope yet. https://www.driftingruby.com/episodes/apple-silicon-developer-transition-kit
API documentation with Swagger
Just published the new chapter of the API-only ruby on rails course: API documentation with Swagger [more inside]
Intro to Docker for Ruby developers
The simplest thing you can do with Docker is to fire up an IRB session in Docker.
Dockerized development environment for hacking Ruby MRI
This is how I’m hacking Ruby itself: github.com/palkan/ruby-dip. [more inside]
Fast JSON API Serializer by Netflix in Ruby On Rails
Want better performance in Ruby on Rails? Here’s how Fast JSON API Serializer can help you by exposing more information as compared to Active Model Serializer.
To ERB and Beyond! What’s New in Bridgetown 0.16 “Crystal Springs”
It’s the height of summer, and we’re here with a real treat for Rubyists everywhere! At last you can have your cake and eat it too with the release of Bridgetown 0.16 “Crystal Springs”—write site templates in your choice of ERB, Haml, or Slim all while enjoying the benefits of Bridgetown’s Jekyll-inspired ease of configuration and rapid content development process. Read the announcement post for all the details.
Desktop Development in Ruby is on Steroids with Glimmer!
Glimmer 0.10.1 (Ruby Desktop Development GUI Library), Glimmer DSL for SWT 0.5.2, Glimmer DSL for XML 0.2.0, Glimmer DSL for CSS 0.2.0, and Glimmer Video Custom Widget 0.1.3 have been released! [more inside]
Objects are functions! Treat any Object or Class as a Proc (like Enum
- A function is a mapping of one value to another with the additional constraint that for the one input value you will always get the same output value. So, conceptually, Ruby Hashes, Arrays, and Sets are all functions. Also, there are many one method objects out there (e.g. Service Objects) that are essentially functions. Why not treat them as such?
Charge Customers Later Using Stripe With Ruby on Rails
Confused about how to integrate STRIPE for online payments? Here’s a quick guide that outlines the process in a few simple steps -