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.
Trailblazer 2.1.2 bringing the Each() macro.
The new version of Trailblazer adds loops in operations, composable filters for step input and output, and even a cool IDE! Here’s the blog post.
Scale your app with slices! | Hanami Mastery #36
How to reduce the technical debt when the application grows in Hanami? Use slices, as the key feature to revolutionize the way you think about web applications in Ruby. [more inside]
A Guide to Memoization in Ruby
Discover the benefits of memoization for your Ruby application, common mistakes to avoid, and when not to memoize. [more inside]
Applicative programming in Ruby: railway reimagined
In this post we will see how applicative programming can be used for implementing code in the Railway style using a gem applicative-rb.
Rails 7.1 supports password challenge via has_secure_password
From Rails 7.1, has_secure_password now includes a password_challenge accessor to validate it against the currently persisted password. Check out more on this here.
Rails console command made easier
A short article about how to simplify the Rails console command thanks to the aliases file. [more inside]
This Week In Rails Wrapped: An Overview Of Rails 7.1 Features. Part I.
A detailed overview of some of the features coming to Rails 7.1. This is part 1 of 3.
ethname gem - Free Crowd-Sourced "Off-Chain" Eth(erum) Name Service / Helper
Hello, in the ongoing ruby crypto winter series I put together another little gem, that is, ethname - a light-weight crowd-sourced “off-chain” ethereum name to (contract) address service / helper (incl. punks v1,v2,v3,v4; phunks v1,v2, synth punks, punk blocks, etc.). Yes, you can! Add more names / contracts via git (hub) ;-). Happy data wrangling / processing and blockchaining with ruby. Cheers. Prost.
Ruby 3.2 introduces Enumerator#product
https://codewithrails.com/ruby-enumerator-product - We can now create Cartesian products with multiple arrays/ranges using the convenient Enumerator.product(x, y, 1..3) syntax on Enumerator objects.
The Basics of Receiving Webhooks in Rails
Let’s take a look at the most simple, straightforward way to receive webhooks in a Ruby on Rails application.
etherscan-lite gem - light-weight machinery / helper for the Etherscan JSON HTTP API
Hello, I put together a little gem, that is, etherscan-.lite, a light-weight machinery / helper for the Etherscan JSON HTTP API. To get your started I tried the official etherscan recipe examples. 1) Get All USDT Transfers from Binance 2) Get the Latest Moonbird Non-Fungible Token (NFT) Transfers 3) List ETH deposits to Arbitrum Bridge. Happy data wrangling / processing and blockchaining with ruby. Cheers. Prost.
Coding the shell cat command in Ruby
A one-liner that copy the exact same behavior as the cat command. It works just fine with files and STDIN: SEE ONE-LINER. [more inside]
Sort a Ruby array
A short article about how to sort an array in Ruby. It’s a classic problem in other languages too, so let’s explore the Ruby case. [more inside]
3 CI/CD Jobs for Any Repository
Discover these CI/CD jobs that are both widely applicable and generally useful that they can fit into any repository. [more inside]
Speed up aggregate roots loading with snapshot events
Rails Event Store 2.7 is coming in days with a new experimental feature SnapshotRepository. https://blog.arkency.com/speed-up-aggregate-roots-loading-with-snapshot-events/
What's new in Ruby 3.2's IRB?
I wrote an article introducing new features @k0kubun and I made to IRB v1.6, which will be the built-in version of Ruby 3.2: https://st0012.dev/whats-new-in-ruby-3-2-irb
Mock Suey: Keeping mocks in line with real objects
Mock Suey is a collection of tools (and a new gem in the TestProf family) which helps to avoid false positives when using mocks in Ruby tests.
David Heinemeier Hansson on Finding the Right Balance Between Business and Technology
Ruby on Rails creator and Co-owner & CTO of 37signals David Heinemeier Hansson shares his way of doing business in the software industry. [more inside]
Halt or Handle? Dealing with errors in Hanami apps!
Handling exceptions is one of the most needed features for any application that can scale. If you are wondering, how to handle errors in Hanami 2 applications, don’t look for more. [more inside]
How to use Alpine.js with Rails & Turbo
https://codewithrails.com/alpinejs - How to install Alpine.js and build UI interactions like a modal and flash message integration
Building Technical Wealth and Improving Legacy Code with M. Scott Ford
Are you working on Ruby on Rails Applications that are constantly on fire, overwhelmed by technical debt? What if you were building Technical Wealth instead? Learn which tools & strategies to work with legacy code effectively, remove dead code, and leave tech debt behind. [more inside]