I've got situation where I need to define table_name and table_name_prefix within a model and for some reason table_name overrides table_name_prefix.
class ScheduleItem < ActiveRecord::Base
self.table_name = "schedule_item"
self.table_name_prefix = 'ACQ_IBM_T.'
end
The prefix is completely ignored in the queries. But, when I comment out the table_name part then the prefix is added. Anyone has seen strange behavior like this before?