[Rails] Microsoft SQL Server has me stumped

Brian Hogan
Fri, 24 Mar 2006 21:18:09 -0000

I''m tinkering around with an old legacy table in SQL Server 2000.
Ruby 1.8.4, most recent ADO.rb file from RubyForge, Rails 1.0

 Here''s the model:

class InventoryItem < ActiveRecord::Base
  set_table_name  "[_SMDBA_].[_INVENTOR_]"
  set_primary_key  "sequence"
end

Everything works fine. I can retrieve records without issue.

However, when create a new instance of InventoryItem, there are no
attributes returned!

i = InventoryItem.new
#<InventoryItem:0x365eee0 @new_record=true, @attributes={}>

Anyone know where I would start looking?

Seems strange then that InventoryItem.find(:first) would return a full
attribute set with all of the data appropriately assigned....

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...