Permalink
Browse files

better documentation and fixed a typo and a superfluous conditional

  • Loading branch information...
1 parent 4aaa029 commit 176aa0e93040088ae8c8a8bee7b8b4780b2c2e37 @abloom abloom committed Oct 1, 2008
Showing with 3 additions and 3 deletions.
  1. +1 −1 README
  2. +1 −1 lib/active_reload/connection_proxy.rb
  3. +1 −1 lib/active_reload/master_filter.rb
View
@@ -78,7 +78,7 @@ Using the MasterFilter class is quite simple. If you have any actions you know r
the Master DB for both reads and writes simply do the following:
class RandomController < ApplicationController
- around_filter MasterFilter, :only => [:show, :edit, :update]
+ around_filter ActiveReload::MasterFilter, :only => [:show, :edit, :update]
...
end
@@ -39,7 +39,7 @@ def set_to_master!
end
def set_to_slave!
- return if @current == @master
+ return if @current == @slave
logger.info "Switching to Slave"
@current = @slave
@@ -4,7 +4,7 @@ class MasterFilter
def self.filter(controller, &block)
proxy = ActiveRecord::Base.active_connections['ActiveRecord::Base']
- if proxy and proxy.respond_to?(:with_master)
+ if proxy.respond_to?(:with_master)
proxy.with_master(&block)
else
yield block

0 comments on commit 176aa0e

Please sign in to comment.