1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Nicholas Seckar 2006-01-22 06:28:49 +00:00
parent ea30f7353b
commit cffd1a9c3a
2 changed files with 10 additions and 0 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Show a meaningful error when the DB2 adapter cannot be loaded due to missing dependencies. [Nicholas Seckar]
* Make .count work for has_many associations with multi line finder sql [schoenm@earthlink.net]
* Add AR::Base.base_class for querying the ancestor AR::Base subclass [Jamis Buck]

View file

@ -219,4 +219,12 @@ begin
end
rescue LoadError
# DB2 driver is unavailable.
module ActiveRecord # :nodoc:
class Base # :nodoc:
def self.db2_connection(config) # :nodoc:
# Set up a reasonable error message
raise LoadError, "DB2 Libraries could not be loaded."
end
end
end
end