aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2006-04-28 00:56:15 +0000
committerMarcel Molina <marcel@vernix.org>2006-04-28 00:56:15 +0000
commit2ec1527c47f87a2fca64a060ec13bf9ba1101a53 (patch)
tree93d68dc47cbd744985b415ea802b3dc49364dbb3
parent7a8ed3bbbf44b273622be0e324a616065f5656a8 (diff)
downloadrails-2ec1527c47f87a2fca64a060ec13bf9ba1101a53.tar.gz
rails-2ec1527c47f87a2fca64a060ec13bf9ba1101a53.tar.bz2
rails-2ec1527c47f87a2fca64a060ec13bf9ba1101a53.zip
Only modify the sequence name in the FrontBase adapter if the FrontBase adapter is actually being used. [Marcel Molina Jr.]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--activerecord/CHANGELOG2
-rw-r--r--activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 1aac586b04..9540d6fc17 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Only modify the sequence name in the FrontBase adapter if the FrontBase adapter is actually being used. [Marcel Molina Jr.]
+
* Add support for FrontBase (http://www.frontbase.com/) with a new adapter thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com]
* Add warning about the proper way to validate the presence of a foreign key. Closes #4147. [Francois Beausoleil <francois.beausoleil@gmail.com>]
diff --git a/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb b/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb
index 0610b7dbc1..b73915cf5c 100644
--- a/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/frontbase_adapter.rb
@@ -8,14 +8,12 @@ FB_TRACE = false
module ActiveRecord
class Base
-
class << self
- # FrontBase only supports one unnamed sequence per table
- def set_sequence_name( value=nil, &block )
- end
-
# Establishes a connection to the database that's used by all Active Record objects.
def frontbase_connection(config) # :nodoc:
+ # FrontBase only supports one unnamed sequence per table
+ define_attr_method(:set_sequence_name, :sequence_name, &Proc.new {|*args| nil})
+
config = config.symbolize_keys
database = config[:database]
port = config[:port]