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.
Adding Tables to ActionText With Stimulus.js
ActionText is a really flexible framework that lets you embed any kind of model, even interactive table editors! Follow along as I build on a Railsconf talk to show how to add editable tables to your ActionText form with Stimulus.js https://onrails.blog/2020/09/30/adding-tables-to-actiontext-with-stimulus-js/
Do more with rails console by configuring ~/.irbrc 🎉
How to add methods which you use daily basis in your ~/.irbrc file to boost your productivity https://rishiip.dev/p/do-more-with-rails-console/
Life beyond the cargo cult
A story about coming to terms with past naivety and why/how we switched from RSpec to TestUnit…without actually switching! https://sourcediving.com/life-beyond-the-cargo-cult-14964dbb6854
AppleAuth: Ruby Gem for Apple Sign in Rails Integration
Hi! I’ve just published a new post on the Rootstrap blog about AppleSignIn https://www.rootstrap.com/blog/ruby-gem-apple-sign-in-rails-integration/
How to resize and crop ActiveStorage variant
medium.image.variant({ combine_options: { resize: "400x300^", crop: '400x300+0+0' }})
[more inside]
Building a Ractor based logger that will work with non-Ractor compatible code
I wrote a post about building a Ruby 3 Ractor based logger that will work with no-Ractor compatible code: [more inside]
Modern command line alternatives for Ruby developers
I wrote a post on Everyday Rails about my favorite modern command line alternatives for customizing my prompt and several tools I use for more productivity on a daily basis.
Rails Monolith towards Engines spike - The experience of a ten-people team
Why we settled on keeping a Rails monolith, instead of going for separation using Rails Engines. https://withatwist.dev/our-rails-engines-spike.html
The Complexity of Active Record Transactions
A critical dive into the implementation differences of database transactions between Active Record and Sequel. https://janko.io/the-complexity-of-activerecord-transactions/
Upload files to Amazon S3 using Active Storage with Securely Storing Credentials
Rails 5.2 comes up with inbuilt feature called Active Storage for the same purpose i.e File uploading which is much simpler than existing options. https://www.botreetechnologies.com/blog/rails-5-2-upload-files-to-s3-with-active-storage-rails-5-2-credentials
Tracking PaperTrail versions while saving in batches
The article explains how to efficiently track and query PaperTrail versions while saving multiple models in batches. https://veelenga.github.io/tracking-paper-trail-versions/
Reading gems’ source code
I regularly use the command “bundle open” to understand how a gem works. This article explains how/why I use that command. https://www.marionzualo.com/2020/09/27/reading-gems-source-code/
Radio Selection Unselect with Stimulus.js
I recently found myself wanting to be alerted on an unselect action so that I could change what was displayed on the page. A small Stimulus controller that waits for the selection event, and emits its own event that other radio button controllers will receive was the perfect solution! https://onrails.blog/2020/09/25/radio-selection-unselect/
My Website Relaunch
I just published a story about how I lost my website domain, what was happened with it and how I have relaunched my website. https://medium.com/@mayurt20/how-i-have-relaunched-my-website-bb63412c2c03
Sort Rails Records Using Enum Value
Learn more about how to sort records in custom order by enum value in rails. Contact us to build web and mobile app to add value to business. https://www.botreetechnologies.com/blog/how-to-sort-records-in-custom-order-by-enum-value-in-rails
Managing Bundler and Rubygems with Ansible
If you use Ansible for your Ruby setups, and want to install and freeze Rubygems and Bundler, this will come handy.
13 tips to write better Rails code
Writing clean code is the key for maintainable and sustainable code. [more inside]
ActiveWorkflow 0.9.10 is out, with an official Docker image
Starting with this release we are publishing official docker images for ActiveWorkflow to DockerHub. Now you can start using ActiveWorkflow without ever touching the source code repository (unless you want to). [more inside]
Kiba ETL v3.5.0 is out (with Ruby 2.7+ support)
I’m happy to announce Kiba v3.5.0 and kiba-common v1.1.0. [more inside]
Resize and optimise images on upload with ActiveStorage
I wrote a a post on how I optimise images uploaded with ActiveStorage by reducing resolution and applying some compression optimisations. The result is a smaller file without sacrificing much in quality. [more inside]
Enforce code boundaries in Rails apps with Packwerk
Packwerk is a Ruby gem created at Shopify that can be used to enforce boundaries and modularize Rails applications. Try it out yourself by running packwerk init in the application after installing it.
Heroku features that I didn't know about
Might not be 100% ruby related, but since a lot of us here use Heroku I though I would share some recent things I’ve learn about the platform. I’ve been using Heroku for years, and still manage to, somehow, miss the new features announcements.