Skip to content

Commit

Permalink
Apply fixes suggested by http://github.com/deepak-srishti
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricio committed Nov 9, 2009
1 parent bf09ca6 commit 67fd679
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README
Expand Up @@ -21,7 +21,7 @@ end

To use this adapter you just have to install the plugin:

ruby script/plugin install git://github.com/mauricio/master_database_adapter.git
ruby script/plugin install git://github.com/mauricio/master_slave_adapter.git

And then configure it at your database.yml file:

Expand Down
12 changes: 8 additions & 4 deletions lib/master_slave_adapter/adapter.rb
Expand Up @@ -85,11 +85,15 @@ def test_connections
class << self

def with_master
enable_master
begin
if master_enabled?
yield
ensure
disable_master
else
enable_master
begin
yield
ensure
disable_master
end
end
end

Expand Down

0 comments on commit 67fd679

Please sign in to comment.