Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

Commit

Permalink
Rename Sequel::Model.DB to Sequel::Model.db
Browse files Browse the repository at this point in the history
  • Loading branch information
saulius committed Oct 16, 2013
1 parent f9d25f7 commit d8dbb33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/initializers/sequel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
Sequel::Model.plugin :take
Sequel::Model.plugin :validation_class_methods
Sequel::Model.plugin :tariff_validation_helper

Sequel::Model.db.extension :server_block
4 changes: 1 addition & 3 deletions lib/trade_tariff_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ def data_migration_path
end

def with_locked_database(&block)
Sequel::Model.DB.extension :server_block

# We should use the master database for this
Sequel::Model.DB.with_server(:default) do
Sequel::Model.db.with_server(:default) do
begin
if Sequel::Model.db.get_lock(db_lock_key)
yield
Expand Down

0 comments on commit d8dbb33

Please sign in to comment.