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.
Rails and JavaScript, parts 2 and 3
My series of posts on the history of Rails and JavaScript continues with part 2 covering CoffeeScript, Sprockets and Turbolinks and part 3 covering Webpacker and Stimulus.
Pagination and Scroll Restoration with Turbolinks
Two weeks ago, it was all the rage to point to missing HEY features as slam-dunk arguments for your-SPA-framework-of-choice. One of those was restoring your place in your imbox after opening an email. Here’s a look at how we might do it.
Anonymous Struct Literals Might Be Coming To Ruby
There’s a neat proposal to add anonymous Struct literals to Ruby! I wrote an article summarizing the proposal and why it’s great. Check it out here!
A Safer RuboCop, Part Deux
A wrote a short article on our recent efforts to improve auto-correct in RuboCop.
Soft Delete with Discard
Soft delete is a way where users can mark a record as no longer needed, but the data is retained. https://www.driftingruby.com/episodes/soft-delete-with-discard
How to Install Mariadb on Ubuntu and Connect Ruby on Rails?
Learn more about how to install mariadb on Ubuntu and connect ruby on rails?
rubocop-graphql
rubocop-graphql is a rubocop plugin that enforces graphql-ruby best practices
[ActiveRecord] Easily build and chain Common Table Expressions queries
Following on my 6 months old PR to bring CTE support to Rails out of the box I released the code as a Ruby gem https://github.com/vlado/activerecord-cte.
It uses Arel in the background and is database agnostic. Always returns ActiveRecord::Relation so it is easy to chain, cache, count, aggregate, …
has_placeholder_image for ActiveStorage models
We’ve released a Ruby gem enabling developers to generate string based placeholder images for Ruby on Rails models with ActiveStorage. Check it out: [more inside]
Ruby Mysql2 Lambda Gem
Very simple Mysql2 gem precompiled for Amazon Linux 1 & 2 (Ruby 2.5 & 2.7) with statically linked libmysqlclient ready for any AWS Lambda usage, including Rails.
Generating fibonacci numbers using dictionary and recursion
rubycademy.com/fibo-numbers-dictionary-recursion
Is module_function really the same as extend self ?
A deep dive into module_function and extend self.. [more inside]
Overview of running Rails on ECS Fargate
This post gives you an overview of the key components needed to deploy a Rails app to Amazon ECS on AWS Fargate. [more inside]
A few sneak peeks into Hey.com technology
An ongoing series of posts analyzing the hey.com website front-end code, trying to find the goodies that will possibly get extracted into future Rails, Turbolinks and Stimulus framework releases. An examination of the How did they do it? question. [more inside]
How To Integrate Google Calendar API with Rails
Integrate your Ruby on Rails application with the Google Calendar API and add tasks. Follow these steps during Ruby on Rails development to integrate Google Calendar. [more inside]
The real reason why `!` has a higher precedence than `not`
rubycademy.com/operator-vs-keyword
Trailblazer 2.1 released with dev tools and state machines
Trailblazer is a framework for a stronger Rails architecture. It provides service objects and flow control. Yesterday, we launched the new website and more docs along with a comprehensive release post introducing an improved developer experience, state machines, and many more upcoming gems.
WahWah - Audio metadata reader ruby gem
WahWah has been released v1.0.0 now. WahWah is an audio metadata reader ruby gem, it supports many popular formats including mp3(ID3 v1, v2.2, v2.3, v2.4), m4a, ogg, oga, opus, wav, flac and wma. WahWah is written in pure ruby, and without any dependencies.
New Screencast Site About Rails (+ Web-Dev in General)
I’ve been an indie Rails-hacker for 10+ years and recently recorded a series of screencasts showing behind the scenes of my web-app business, site OxbridgeNotes (scale = approximately 14k LOC Rails/JS). [more inside]
digest-crc 0.6.0 released. ~40x performance improvement!
digest-crc 0.6.0 has been released. This release introduces optional C extensions, that when built on CRuby, will override the pure-Ruby CRC methods with C equivalents, providing a ~40x performance improvement. If the C extensions cannot be built (no compiler installed, no ruby.h headers, not using CRuby) digest-crc will fallback to using the pure-Ruby CRC methods. [more inside]
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!