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.
tty-editor v0.6 is out!
The latest tty-editor supports opening multiple files, searches more editor commands and adds configuration options like :raise_on_failure to make it even more flexible. Enjoy!
Taptag: Ruby interactions with NFC and Raspberry Pi
A Gem for working with Waveshare’s PN532 NFC HAT for Raspberry Pi. Wraps C code for quick execution, and comes with extras to get you started with it out of the box. Read about it on my website or check out the code on GitHub
Why Ruby on Rails is Perfect for eCommerce Web Development in 2020
Ruby on Rails is one of the web development frameworks for building web applications. Even though Ruby on Rails has reached its maturity, https://www.business2community.com/ecommerce/why-ruby-on-rails-is-perfect-for-ecommerce-web-development-in-2020-02347634
bundler-download
The RubyGem ecosystem, famous for gems like Rails for web development, Devise for authentication, and Pundit for authorization, enables productivity via code reuse. As such, it is great for quickly adding libraries to your project to automate part of the work or reuse other people’s solutions to solved problems. That said, you wouldn’t want to package extremely large files like the OpanAI 1GB+ files in a RubyGem. Enter bundler-download, a Bundler Plugin that enables downloading extra gem files after installing with bundle install by declaring gem downloads in a Downloadfile
https://andymaleh.blogspot.com/2020/09/bundler-download-plugin-post-gem.html
How to Build Blog with Ruby on Rails (Part 6)
Authentication in Rails application by Devise https://fullstackrubyonrails.com/blog/authentication-in-rails-application
Truemail 1.9.1 🚀 supports MRI Ruby 2.7.x+ syntax
Added compatibility with Ruby 2.7.x syntax. Also added new Truemail developers docs 📚 with a lot of usecases. Be sure that email address valid and exists. https://github.com/rubygarage/truemail
Testing for Errors without Side–Effects in RSpec
A simple way to write RSpec tests that assert an exception is raised and changes are rolled back.
Refactor your switch statements with case_register
case_register is a gem that provides a design pattern to manage switch statements by mapping each case to a method which is dynamically defined in advance.
Modern Rails flash messages (part 2): The undo action for deleted items
Easily allow users to undo removing of deleted items using modern Rails flash messages with the undo action. The second part of the tutorial with full code on GitHub and live demo.
Tracking All Paper Trail Version From A Single Request With Correlation UUIDs
If you’ve ever had a need to implement an audit log to track all the changes that get persisted for all or at least some models in your application, there is a good chance that you’ve encountered PaperTrail gem that makes it trivial to track all the changes - it might be as easy as adding has_paper_trail to the desired models. [more inside]
Writing a background job processing using Ractor
How to use Ractor the new concurrency primitive to build a simple background job processing [ READ MORE ]
The Hidden Costs of Software Dependencies [YouTube]
I take a 10-year perspective on my Rails application and look at how Ruby and JS dependencies contributed to maintenance costs: https://www.youtube.com/watch?v=rQegYUsU7ec
The Data Cascade, Find Tag, and More in Bridgetown 0.17
We’re pleased to announce the release of Bridgetown 0.17, codenamed “Mount Scott”. Some of the improvements are optimizations at the code level and preparing for bigger features down the road (i18n), but there are also a few goodies you can start using in your static site projects today. https://www.bridgetownrb.com/release/whats-new-in-0.17-mount-scott/
Glimmer Has Been One Point Oh’ed!
Glimmer is finally 1.0.0. This marks a big milestone since Glimmer has outgrown its single-library roots and has become an assortment of Ruby gems that work together, such as Glimmer DSL for SWT (JRuby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Desktop Development GUI Library), Glimmer DSL for Opal (Web GUI Adapter for Desktop Apps), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS. https://andymaleh.blogspot.com/2020/09/glimmer-has-been-one-point-ohed.html
The defined? keyword in Ruby
An overview of the defined? keyword with a use case from the Ruby source code.. and an optimization tip! https://medium.com/rubycademy/the-defined-keyword-in-ruby-b7a5a5a48e1e
Rails Concerns: To Concern Or Not To Concern
Should you be concerned about Rails concerns? [more inside]
Interesting Methods to Work with Ruby Hashes in A Better Way
Learn more about important methods for ruby hashes. Taking care of some mistakes while accessing ruby hashes and working on it. https://www.botreetechnologies.com/blog/interesting-methods-to-work-with-ruby-hashes-in-a-better-way