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.
Access control gem for your Rails application
A way to do authentication checks and authorization in your Rails application. [more inside]
Must have ruby gems in the development environment to increase productivity.
Must have ruby gems in the development environment to increase productivity. [more inside]
[Fix] Build Failed while Installing Ruby with Rbenv on M1 Mac
Tutorial to fix errors: 1. BUILD FAILED (macOS 11.2.3 using ruby-build 20210309) 2. Inspect or clean up the working tree at /var/folders/….. [more inside]
Code Quality, or Cheat Code?
I finally got around to looking at the flay documentation a few days ago, and then I added a .flayignore file to ShinyCMS to skip checking Rails controllers and Pundit policies for duplication. This had a quite noticeable effect on the lower-scoring files in my Ruby Critic summary - the D and F grades - in fact it got rid of every single one of them…
Using Hotwire Turbo in Rails with legacy JavaScript
Thankfully, Hotwire Turbo is perfectly usable even in an old project full of JavaScript, i.e. with Turbo Drive (Turbolinks) disabled. [more inside]
check your logs directly in browser (for staging, production) + have simple console
https://github.com/igorkasyanchuk/sweet_staging with minor fixes and improvements. You can run Ruby code in a browser on your staging server, or “tail” staging.log in real time.
Alba 1.1.0 now deals with circular associations
I just released Alba version 1.1.0. This release supports circular associations control, letting you customize how it serializes nested associations with declarative hash.
Fast text search with PostgreSQL in a Rails project
I explain how I optimized text search from a naive implementation to full speed : http://alexis.bernard.io/blog/2021-04-22/fast-text-search-with-postgresql-in-a-rails-project.html
Rack apps mounted in Rails — how to protect access to them?
Sidekiq, Flipper, RailsEventStore — what do these Rails gems have in common? They all ship web apps with UI to enhance their usefulness in the application. In production application you’ll want to protect access to them. [more inside]
Rails Wizards (9-part-series)
https://jonsully.net/blog/rails-wizards-part-one/ — I spent the last few weeks investigating the storied history of building a multi-step form / wizard in Rails. Seems like there’ve been a lot of proposed ways to make the cookie crumble in Rails’ long history. I hoped to add clarity to a few means of doing that while investigating my own needs for my specific project. Hopefully it’s a net-positive 😊
What's Cooking in Rails 7?
A new version of Rails always brings new and exciting features. This writeup takes a look at some of the things Rails 7 has in store for us. [more inside]
Some technical SEO tips for Rails applications
Here are some production-tested tips for making sure your Rails app is as SEO friendly as possible. Ruby on Rails SEO tips
Will I Find Work if I Learn Ruby?
You love Ruby. It’s quirky, you have lots of fun solving problems with it. But will there still be jobs waiting for you if you invest more time learning Ruby in 2021? [more inside]
Rails' Hidden Gems: ActiveSupport StringInquirer
If you’ve ever checked the environment in your Rails app with Rails.env.production? you’ve used a fascinating little utility class called StringInquirer. In this post, Jonathan Miles dives into the rails codebase to show us exactly how StringInquirer works and how we can bring a little of its magic to our own apps. https://www.honeybadger.io/blog/rails-activesupport-stringinquirer/
Continuous Integration for Monorepos
https://semaphoreci.com/blog/continuous-integration-monorepos - Learn how to design and run faster CI/CD pipelines on #monorepos.
active_workflow_agent-0.1.0 released
active_workflow_agent helps you to write your own ActiveWorkflow agents in Ruby using ActiveWorkflow’s agent API. [more inside]
The "What" and "Why" or How I'm hiding those ugly if's in my Service Objects
The “What” belongs to perform public method and the “Why”s reside in private methods. [more inside]
Solidus v3.0.0
Solidus 3 supports Ruby 3, Rails 5.2, 6 and 6.1 and now ships with support for Active Storage attachments by default. This major bump only removed deprecated code to allow smooth upgrades from previous versions. [more inside]
Ruby 3 benchmarks in PDF generation
If you are interested, I did some new benchmarks for 2.7, 3.0 and 3.0 –jit.