RubyFlow The Ruby and Rails community linklog

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

  Today

rails-tenantify — row-level multi-tenancy for Rails 7+

rails-tenantify adds row-level multi-tenancy to Rails 7+ apps — one database, one organization_id column, no external service. Every multi-tenant SaaS needs scoped queries, safe background jobs, and protection against cross-tenant bulk SQL. acts_as_tenant is showing its age on Rails 7. Apartment pushes schema-per-tenant ops. rails-tenantify is a small gem that does the boring parts right. What you get (v0.1.2): → belongs_to_tenant :organization on any model → set_tenant_by :subdomain (acme.yourapp.com → tenant) → set_tenant_by :header (X-Tenant-ID for APIs) → Tenantify.switch_to / without_tenant → ActiveJob + Sidekiq: tenant context on enqueue and retry → Guards update_all, delete_all, destroy_all → Cross-tenant belongs_to validation → RSpec helpers: with_tenant / without_tenant → audit_overrides: :log, :raise, or :ignore Quick start: gem “rails-tenantify”, “~> 0.1.2”, require: “rails-tenantify” Tenantify.configure { |c| c.tenant_model = “Organization” } class Project < ApplicationRecord include Tenantify::Scoped belongs_to_tenant :organization end class ApplicationController < ActionController::Base set_tenant_by :subdomain end Built from a real multi-school Rails app (online exam system) with automated tenant isolation checks. Subdomain tenants work today; full custom domains on the roadmap. RubyGems: https://rubygems.org/gems/rails-tenantify GitHub: https://github.com/sghani001/rails-tenantify MIT · PRs welcome

asgard v0.3.0 release Thor and Loki working for you!

I got tied of cussing the CLI task running that I’ve been using for a few years. It was good but it wasn’t Ruby. So I wrote my own. The power of The Mighty Thor for a great CLI experience with Loki managing the tricks of the trade. The power of Ruby endorsed by every mythical god of the higher realms. [more inside]

View Primitives

I like the simplicity of traditional Rails apps and the component-based approach of ViewComponent, but I always felt the ecosystem was missing something like shadcn/ui. So I built View Primitives — a collection of reusable UI primitives powered by ViewComponent. Would love to hear your feedback. https://github.com/alec-c4/view_primitives

Loading older posts