class AnimalsBase < ApplicationRecord connects_to database: { writing: :animals, reading: :animals_replica } end ActiveRecord::Base.connected_to(handler: :reading) do Dog.read_something_from_dog ModelInPrimary.do_something_from_model_in_primary end
class ActiveSupport::TestCase parallelize(workers: 2) end
PARALLEL_WORKERS=15 bin/rails test
DEPRECATION WARNING: update_attributes is deprecated and will be removed from Rails 6.1 (please, use update instead)
DEPRECATION WARNING: Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "seq IS NULL, seq ASC". Non-attribute arguments will be disallowed in Rails 6.0. This method should not be called with user-provided values, such as request parameters or model attributes. Known-safe values can be passed by wrapping them in Arel.sql().