method
remove_prefix_and_suffix
v6.1.3.1 -
Show latest stable
- Class:
ActiveRecord::SchemaDumper
remove_prefix_and_suffix(table)private
No documentation available.
# File activerecord/lib/active_record/schema_dumper.rb, line 288
def remove_prefix_and_suffix(table)
prefix = Regexp.escape(@options[:table_name_prefix].to_s)
suffix = Regexp.escape(@options[:table_name_suffix].to_s)
table.sub(/\A#{prefix}(.+)#{suffix}\z/, "\\1")
end