Replace Makara with an initial Rails 6 role based splitting method.

This commit is contained in:
Free Speech Forever
2021-02-09 19:38:10 +00:00
committed by admin
parent 31922ea58b
commit 473c48b2aa
42 changed files with 3142 additions and 141 deletions

View File

@@ -22,11 +22,17 @@ class Api::V1::Accounts::StatusesController < Api::BaseController
private
def set_account
@account = Account.find(params[:account_id])
ActiveRecord::Base.connected_to(role: :reading) do
@account = Account.find(params[:account_id])
end
end
def load_statuses
cached_account_statuses
cas = nil
ActiveRecord::Base.connected_to(role: :reading) do
cas = cached_account_statuses
end
cas
end
def cached_account_statuses