We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63cc88c commit 2a977bfCopy full SHA for 2a977bf
lib/annotate/annotate_models.rb
@@ -212,8 +212,8 @@ def retrieve_indexes_from_table(klass)
212
return indexes if indexes.any? || !klass.table_name_prefix
213
214
# Try to search the table without prefix
215
- table_name.to_s.slice!(klass.table_name_prefix)
216
- klass.connection.indexes(table_name)
+ table_name_without_prefix = table_name.to_s.sub(klass.table_name_prefix, '')
+ klass.connection.indexes(table_name_without_prefix)
217
end
218
219
# Use the column information in an ActiveRecord class
0 commit comments