method
tables_in_string
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::Relation
tables_in_string(string)private
No documentation available.
# File activerecord/lib/active_record/relation.rb, line 609
def tables_in_string(string)
return [] if string.blank?
# always convert table names to downcase as in Oracle quoted table names are in uppercase
# ignore raw_sql_ that is used by Oracle adapter as alias for limit/offset subqueries
string.scan(/([a-zA-Z_][.\w]+).?\./).flatten.map(&:downcase).uniq - ["raw_sql_"]
end