class Araa::ActiveRecord

Public Class Methods

filtered_application_tables() click to toggle source
# File lib/araa/active_record.rb, line 5
def self.filtered_application_tables
  # Removes the rails meta tables. Only returns application defined tables.
  ::ApplicationRecord.connection.tables.reject do |t|
    Araa::RAILS_META_TABLES.include?(t)
  end
end
tables_field_map() click to toggle source
# File lib/araa/active_record.rb, line 12
def self.tables_field_map
  table_fields = []

  filtered_application_tables.each do |t|
    table = Araa::Table.new(t)
    table.fields.each do |field|
      table_fields << "#{t}::#{field}"
    end
  end

  table_fields
end