Hi
I have a rather large project that uses ActiveRecord both with Rails,
and separately in various scripts. All has been working well until
I upgraded from version 2.0.2 to version 2.2.2. Now, ActiveRecord
doesn't seem to be looking for the correct table. Here's an example
of what I'm seeing.
class ActiveRecord::Base
def self.get_dbconf
conf = Hash.new
IO.foreach("/etc/dbconf") do |line|
next if line.length == 0
name, data = line.split(": ")
conf[name] = data.chomp
end
return conf
end
Conf = get_dbconf
end
end
class Scode < ActiveRecord::Base
Scode.establish_connection(self::Conf)
end
irb(main):001:0> require 'scode'
=> true
irb(main):002:0> Scode
=> Scode(Table doesn't exist)
irb(main):003:0> Scode.table_name
=> "\e[4mScode\e[0ms"
I know I can set the table name manually, but if this simple mechanism
is broken, how much other stuff is broken in this version?
Ken
--
I use the words you taught me. If they don't mean anything any more,
teach me others. Or let me be silent.
Samuel Beckett (Clov, Endgame)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---