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.
spreadsheet_architect gem v5.0.0 released!
I have now released v5.0.0 of spreadsheet_architect. Spreadsheet Architect is a library that allows you to create XLSX, ODS, or CSV spreadsheets super easily from ActiveRecord relations, plain Ruby objects, or tabular data.
The Secret Art of Storytelling in Programming
Here are some guidelines to write code that flows like a story: https://semaphoreci.com/blog/storytelling-programming
Securing Rails applications with Content Security Policy
Nowadays web application security is a crucial and unfortunately sometimes a bit neglected matter. Today, I’ll focus on Content Security Policy - a handy mechanism that can protect our app from XSS attacks. https://kukicola.io/posts/securing-rails-app-with-csp/
Understand Ruby Blocks by looking at examples from popular gems
Using Ruby blocks with yield is a different style of programming, that can improve the design of our Ruby code.
Programming Ruby 3.2 -- The Pickaxe Book -- Released in Beta
Programming Ruby 3.2, the fifth edition of the Pickaxe Book, is now available in beta at https://pragprog.com/titles/ruby5/programming-ruby-3-2-5th-edition/. [more inside]
Build a Table Editor with Trix and Turbo Frames in Rails
Build a table editor in a Rails application using ActionText’s Trix editor, and use Turbo Frames to customize your table. https://blog.appsignal.com/2022/10/26/build-a-table-editor-with-trix-and-turbo-frames-in-rails.html
How to Open Source with Richard Schneeman | hexdevs podcast
If you contribute to open source, can you just skip the whiteboard interview? …Probably not! 🙉 1.9+ billion downloads across 66 gems, and schneems still had to do coding interviews. Go from coder to fearless contributor: watch our conversation with Richard Schneeman, author of the book “How to Open Source”! [more inside]
🇺🇦 New version of truemail 📤 has been released 🚀 🇺🇦 🚀
In the latest truemail release has been added ability to specify whitelisted/blacklisted emails directly. It can be used as a part of SEA (spam email address) validations. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists. https://github.com/truemail-rb/truemail
Rubber Duck Dev Show Episode 62 | Staying Off The Rails With Joel Drapper
In this episode, we discuss when you might want to go “off the rails” with your framework and stay “off the rails” with Joel Drapper. We also talk about his Phlex project: https://www.rubberduckdevshow.com/episodes/62-staying-off-the-rails-with-joel-drapper/
Ruby ternary operator
Many languages have a ternary operator, including Ruby. The goal is to reduce the size of the code by displaying a one-line condition. Let’s see how. [more inside]
[ANN] rodauth-oauth 1.0.0-beta1 released
rodauth-oauth 1.0.0-beta1 has been released. [more inside]
Maglev: a page builder in your Rails app
The very first version of our open source page builder has been released 🎉 [more inside]
Improve Code in Your Ruby Application with RubyCritic
Let’s take a look at RubyCritic and dig into RubyCritic’s reports. https://blog.appsignal.com/2022/10/19/improve-code-in-your-ruby-application-with-rubycritic.html
How to Use Rubocop for Your Team’s Rails Apps
Rubocop helps your team decide on and enforce code standards in Ruby projects, which will undoubtedly improve the quality of your codebase over time. https://semaphoreci.com/blog/rubocop
ViewComponent in the Wild II: supercharging your components
In part two (the final part) of this article: GitHub’s ViewComponent library has been around for some time, saving developer sanity when building Ruby on Rails app view layers. It’s steadily grown in popularity—but probably not as quickly as deserved. In this series, I explain why to give it a shot! We discuss best practices and examine various tips and tricks accumulated in our ViewComponent-powered projects. [more inside]
Paginate resources in Hanami apps with ROM
Do you validate pagination parameters? Or filter params? In this episode, I’m showing the possible use case for doing exactly that using built-in ROM pagination support and dry-schema. [more inside]
Enumerating Musical Notes
This post utilizes a score of Array and Enumerable methods to model music notes. [more inside]
How to Build Your Own Rails Generator
Generators are a powerful feature you can use to automate routine tasks in Rails—but do you know how to make your own? This article explores Rails generators in depth, including how to build a generator from scratch. https://www.honeybadger.io/blog/build-a-rails-generator/
Rubber Duck Dev Show Episode 61 | Live Streaming Tools & Toys With Aaron Francis
In this episode, we discuss different tools & toys you can use to live stream or just record your development or training videos with Aaron Francis: https://www.rubberduckdevshow.com/episodes/61-live-streaming-tools-toys-with-aaron-francis/
Passkit: a Rails Engine to serve Wallet Passes
This new Rails Engine, implements all the features you need to start serving Wallet Passes from your Rails App. It comes with a dashboard, example passes, example emails, all APIs, and much more! [more inside]
Ruby-on-Rails and SvelteJS tutorial
SvelteJS is a very promising JavaScript tool that gained traction recently. For those who don’t like Hotwire for Ruby-on-Rails, it sounds a good alternative. [more inside]
Keep Rails DB schema consistent while switching between branches with no additional a
Switching between branches you might end up with inconsistent DB in the current branch due to migrations run inside other branches. I’ve just released a gem that solves that issue for good: https://github.com/widefix/actual_db_schema