Skip to content

Commit

Permalink
Make compatible with ActiveRecord 2.2.2.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.ttiltd.com/svn/dev.rb/trunk/libraries/fb_adapter2@4590 e6efdd46-4312-0410-9032-dd8a18d5a4db
  • Loading branch information
brent committed Dec 2, 2008
1 parent a648c38 commit eadad9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions fb_adapter.gemspec → Rakefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/env ruby
require 'rubygems'
require 'rake/gempackagetask'

spec = Gem::Specification.new do |s|
s.author = "Brent Rowland"
s.name = "fb_adapter"
s.version = "0.5.6"
s.date = "2008-04-04"
s.version = "0.5.7"
s.date = "2008-12-02"
s.summary = "ActiveRecord Firebird Adapter"
s.requirements = "Firebird library fb"
s.require_path = 'lib'
Expand All @@ -18,7 +19,7 @@ spec = Gem::Specification.new do |s|
s.files = ['fb_adapter.gemspec'] + Dir.glob('lib/active_record/connection_adapters/*')
end

if __FILE__ == $0
Gem.manage_gems
Gem::Builder.new(spec).build
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = false
pkg.need_zip = false
end
2 changes: 1 addition & 1 deletion lib/active_record/connection_adapters/fb_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def type
def default
if @default
sql = "SELECT CAST(#{@default} AS #{column_def}) FROM RDB$DATABASE"
connection = ActiveRecord::Base.active_connections.values.detect { |conn| conn && conn.adapter_name == 'Fb' }
connection = ActiveRecord::Base.connection
if connection
type_cast connection.select_one(sql)['cast']
else
Expand Down

0 comments on commit eadad9b

Please sign in to comment.