14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/lib/goldberg/model.rb', line 14
def self.included(base)
base.class_eval do
def self.prefix
if not @prefix
if ActiveRecord::ConnectionAdapters::const_defined?(:PostgreSQLAdapter) &&
self.connection.class.to_s ==
'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter'
@prefix = 'goldberg.'
else
@prefix = 'goldberg_'
end
end
@prefix
end
(table_name =~ /goldberg/) ||
(set_table_name "#{self.prefix}#{self.table_name}")
end
end
|