Permalink
Browse files

Fix "singleton can't be dumped" marshaling error.

  • Loading branch information...
rowland committed Dec 3, 2013
1 parent 1d93d5b commit 2e258db03bb854eb4cd2257ca392f3fb2a40df8e
Showing with 8 additions and 6 deletions.
  1. +8 −6 lib/active_record/connection_adapters/fb_adapter.rb
@@ -72,6 +72,12 @@ def fb_connection(config) # :nodoc:
end

module ConnectionAdapters # :nodoc:
class FbArray < Array
def column_types
{}
end
end

class FbColumn < Column # :nodoc:
def initialize(name, domain, type, sub_type, length, precision, scale, default_source, null_flag)
@firebird_type = Fb::SqlType.from_code(type, sub_type || 0)
@@ -701,13 +707,9 @@ def next_sequence_value(sequence_name)
protected
# add column_types method returns empty hash, requred for rails 4 compatibility
def add_column_types obj
class << obj
def column_types
{}
end
end
obj
FbArray.new(obj)
end

# Returns an array of record hashes with the column names as keys and
# column values as values.
def select(sql, name = nil, binds = [])

0 comments on commit 2e258db

Please sign in to comment.