Permalink
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...
1 parent f9acc58 commit 31c5e423876e5c4d8c30962adc54fed6c6b6c91b Pivotal Casebook committed Jun 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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) : []

0 comments on commit 31c5e42

Please sign in to comment.