Skip to content

Commit

Permalink
DbSession: set the taps database as the default database for Sequel::…
Browse files Browse the repository at this point in the history
…Model
  • Loading branch information
ricardochimal committed Feb 5, 2009
1 parent d1f7b82 commit 9065150
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/taps/db_session.rb
@@ -1,3 +1,5 @@
Sequel::Model.db = Sequel.connect(Taps::Config.taps_database_url)

class DbSession < Sequel::Model
set_schema do
primary_key :id
Expand All @@ -20,6 +22,4 @@ def disconnect
end
end

DbSession.db = Sequel.connect(Taps::Config.taps_database_url)

DbSession.create_table unless DbSession.table_exists?
DbSession.create_table! unless DbSession.table_exists?

0 comments on commit 9065150

Please sign in to comment.