Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Yesterday
ActiveRecord::Base#pluck adds support for hash values in Rails 7.2
ActiveRecord pluck and pick can accept hash values for specifying columns from Rails 7.2 https://blog.saeloun.com/2024/04/26/rails-7-2-activerecord-pluck-to-accept-hash-values/
Animate Filtering Data in HOTWire
We can progressively enhance the filtering search. We can dig deeper into Turbo events and get a very satisfying animation of Todos disappearing when they’re filtered out, and reappearing when they are back in the list. https://onrails.blog/2024/04/23/animate-filtering-data-in-hotwire/
Should You Use Ruby on Rails or Hanami?
Let’s explore the strengths and weaknesses of Rails and Hanami: https://blog.appsignal.com/2024/04/24/should-you-use-ruby-on-rails-or-hanami.html
Shipping Rails logs with Kamal and Vector
You’ve deployed your Rails app with Kamal, but now what? How do you know what’s happening under the hood? You can tail your logs on the server (otherwise known as hard mode), but there’s a better way: ship them off-site with Vector!
The dangers of single line regular expressions
Regular expressions in Ruby are multi-line by default and if you don’t know that, it might lead to unexpected behavior and security issues. In this article we go over a HackTheBox challenge to demonstrate how it could lead to a vulnerability. [more inside]
List all rake tasks (with and without description)
A short tip on how to list the rake tasks without description [more inside]
Open Source Project to Deploy Rails 7 Apps
Deploy Rails 7 app using Capistrano to EC2 instance. Checkout HiveGrid
Introducing Filterameter
This gem provides declarative filter parameters for Rails, enabling filters in query classes or controllers to increase readability and reduce boilerplate code. [more inside]
Ruby is Your Ally to Become a Rails Ninja!
Learning Ruby isn’t just recommended; it’s essential for mastering the full power of Rails: https://www.rubycademy.com/blog/learn-ruby
A Quick Guide to Ruby's Time and DateTime Classes
A Quick Guide to Ruby’s Time and DateTime Classes https://blog.saeloun.com/2024/04/19/a-quick-quide-to-ruby-time-and-datetime-classes.md/
RailsConf 2024 Countdown — Behind the Scenes with Kevin Murphy
📣 The latest Ruby for All episode is now available! [more inside]
New version of DnsMock has been released 🚀
Added ability to interact with DNS message question/answer context. Mimic any DNS records for your test environment and even more: https://github.com/mocktools/ruby-dns-mock
Delegated types in Rails: I tried them, and I'm not sure I really understood them.
Developers have been scratching their head trying to figure out delegated types for ages. Today, I want to share a real-world use case. I’ll walk you through my pre-existing domain architecture, my initial requirements, my mistakes, how I eventually used delegated types, what I learned and my open questions.
New SudoRails version has been released 🚀 Sudo mode for your Rails controllers 🔒
Protect any Rails action with a customizable password confirmation. 🙇 Inspired by GitHub Sudo mode. [more inside]
Handling Exceptions in Grape for Ruby
Let’s explore the basics of Grape exception handling, including customizing exceptions: https://blog.appsignal.com/2024/04/17/handling-exceptions-in-grape-for-ruby.html
The tale of an XSS in Phlex
I reported an XSS to Phlex yesterday and since it was pretty quickly fixed, I wrote a post about it: https://greg.molnar.io/blog/the-tale-of-an-xss-in-phlex/
Introducing Janus a read/write proxy for ActiveRecord 7.1+
Janus is a read/write split proxy for MySQL/ActiveRecord 7.1+. It works by sending any read queries to a replica, and any write queries to the primary database server. If there’s been a write statement within the same thread we stick any future queries to the primary server unless the developer specifically chooses not to. [more inside]
Create a MacOS desktop application with pure Ruby (Tutorial)
This is (for now) a modest step-by-step tutorial about creating a MacOS desktop application with Ruby. [more inside]