Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow force_slave_reads to be called with default options

If you don't pass a Hash, then it should apply to all controller actions.
  • Loading branch information...
commit 31c5e423876e5c4d8c30962adc54fed6c6b6c91b 1 parent f9acc58
@pivotal-casebook pivotal-casebook authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/db_charmer/action_controller/force_slave_reads.rb
View
2  lib/db_charmer/action_controller/force_slave_reads.rb
@@ -4,7 +4,7 @@ module ForceSlaveReads
module ClassMethods
@@db_charmer_force_slave_reads_actions = {}
- def force_slave_reads(params)
+ def force_slave_reads(params = {})
@@db_charmer_force_slave_reads_actions[self.name] = {
:except => params[:except] ? [*params[:except]].map(&:to_s) : [],
:only => params[:only] ? [*params[:only]].map(&:to_s) : []
Please sign in to comment.
Something went wrong with that request. Please try again.