Permalink
Browse files

Fixed a bug where reload is broken for models that inherit from Activ…

…eReload::MasterDatabase
  • Loading branch information...
1 parent fec38cf commit 6967e377b8846ac09dee0efabcfd421922d6c2da Matt Hodgson committed Aug 28, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/active_reload/connection_proxy.rb
@@ -58,7 +58,11 @@ def self.included(base)
end
def reload_with_master(*args, &block)
- connection.with_master { reload_without_master }
+ if connection.class.name == "ActiveReload::ConnectionProxy"
+ connection.with_master { reload_without_master }
+ else
+ reload_without_master
+ end
end
end

0 comments on commit 6967e37

Please sign in to comment.