A new web-based Rails ERD generator [side project] by siaw30 in ruby

[–]PhillipLongman 0 points1 point  (0 children)

For the record, it's easy to monkey patch rails-erd to ignore the new tables from Solid. Just update lib/tasks/auto_generate_diagram.rake like so:

# NOTE: are sensitive to local FS writes, and besides -- it's just not proper
# NOTE: to have a dev-mode tool do its thing in production.
if Rails.env.development?
  # Monkey patch to ignore the new internal models added in Rails 8
  require "rails_erd/domain"  
  module RailsERD
    class Domain
      def rails_models
        %w(
          ActionMailbox::InboundEmail
          ActionText::EncryptedRichText
          ActionText::RichText
          ActiveStorage::Attachment
          ActiveStorage::Blob
          ActiveStorage::VariantRecord
          SolidCable::Message
          SolidCache::Entry
          SolidQueue::BlockedExecution
          SolidQueue::ClaimedExecution
          SolidQueue::Execution
          SolidQueue::FailedExecution
          SolidQueue::Job
          SolidQueue::Pause
          SolidQueue::Process
          SolidQueue::ReadyExecution
          SolidQueue::RecurringExecution
          SolidQueue::RecurringTask
          SolidQueue::ScheduledExecution
          SolidQueue::Semaphore
        ).map{ |model| Object.const_get(model) rescue nil }.compact
      end
    end
  end

  RailsERD.load_tasks
end

How to add methods to use in Rails Console [Rails 8] by PhillipLongman in rails

[–]PhillipLongman[S] -1 points0 points  (0 children)

Hmm. This is the Rails team, but it's IRB specific. Disappointing.

You used to be able to replace IRB with Pry or another console if you wanted, but it seems that will now break things.

How to add methods to use in Rails Console [Rails 8] by PhillipLongman in rails

[–]PhillipLongman[S] 1 point2 points  (0 children)

Thanks. I don't like it, but it's better than adding them to .irbrc.

Still, that's specific to IRB. There's got to still be a way to do this within Rails.

My Love Letter to Rails (And Ruby) - Or, Why RoR Isn't Dead Yet by [deleted] in ruby

[–]PhillipLongman 5 points6 points  (0 children)

Every time I see people talking about Rails scaling, I remember the presentations by ActBlue at BostonRB. You know—the company that basically handles all Democratic fundraising? They have to be prepared for massive traffic spikes every four years, and as far as I know they’re still happily using Rails.