active_record_shards
active_record_shards copied to clipboard
Remove call to on_shard directly on ActiveRecord::Base
I think this call was missed when moving the on_shard
method out of AR::Base and making the default not_sharded.
/cc @bquorning @grosser @jacobat
I agree, tests would be great. How do we test rake tasks?
require the file and then .execute the task alternatively extract logic into static methods
On Mon, Dec 11, 2017 at 1:47 PM, Jacob Atzen [email protected] wrote:
I agree, tests would be great. How do we test rake tasks?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zendesk/active_record_shards/pull/167#issuecomment-350869144, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAsZwvjcXM8m9gwWZowSe68HxqeR3mZks5s_aMPgaJpZM4Q-DLu .
What I tend to do is write what I need in lib
and simply make a method call in the rake task. Basically avoiding any logic in the rakefile.
It's more complicated than anticipated since environment
is not a defined task...
Basically avoiding any logic in the rakefile.
💯