I’m working on making an ActiveRecord adaptor for FrontBase.
I got things working under the stable code base. Now I’m trying to port it to the trunk code so I can commit. Some regressions in the unit tests though. It looks like 1.1 will require migration support, so I can’t defer that until later.
All of the unit tests passed! My patch is now checked in at http://dev.rubyonrails.org/ticket/4093
I had to make a change to Rails code itself to get things working this far. Fixtures.value_list doesn’t pass the column in to the quote method and without a column, it is impossible to distinguish between date/time/timestamp values.
Maybe I just don’t understand Rails deep enough?
This is my new implementation:
def value_list
list = []
klass = eval(@class_name)
@fixture.each_pair do |key, value|
col = klass.columns_hash[key]
element = ActiveRecord::Base.connection.quote(value,col).gsub('\\n', "\n").gsub('\\r', "\r")
list << element
end
list = list.join(", ")
list
end