I have just started to use the octopus gem with rails, i tried like for the normal case
octopus:
replicated: true
fully_replicated: false
environments:
- development
development:
shard_one:
host: localhost
adapter: postgresql
database: app_development
the above i have used for the testing purpose also the main thing is used as the controller specific, not the model specific. I put this in application controller
def select_shard(&block)
Octopus.using(:shard_two, &block)
end
and call that method in appropriate controller, so its works, but when i move to heroku i have followed this http://ift.tt/1noa0Be, because i need the reads only for some controller. so in this case how can i use that follower on controller specific?
Aucun commentaire:
Enregistrer un commentaire