Permalink
Browse files

Dont require sybase unless you try to connect

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent ec4dd57 commit 5ba5dd68dadb76c05d6364be4b0b906ad9125bf2 @dhh dhh committed Mar 2, 2006
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
@@ -5,12 +5,13 @@
# Based on code from Will Sobel (http://dev.rubyonrails.org/ticket/2030)
require 'active_record/connection_adapters/abstract_adapter'
-require 'sybsql'
module ActiveRecord
class Base
# Establishes a connection to the database that's used by all Active Record objects
def self.sybase_connection(config) # :nodoc:
+ require_library_or_gem 'sybsql'
+
config = config.symbolize_keys
username = config[:username] ? config[:username].to_s : 'sa'

0 comments on commit 5ba5dd6

Please sign in to comment.