Module: Glancer::ApplicationHelper

Defined in:
app/helpers/glancer/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#glancer_table_namesObject

Returns the list of indexed table names once per request (memoized).



6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/glancer/application_helper.rb', line 6

def glancer_table_names
  @glancer_table_names ||= Glancer::Embedding
                           .where(source_type: "schema")
                           .pluck(:source_path)
                           .filter_map { |p| p.split("#").last if p.include?("#") }
                           .reject { |n| n == "foreign_keys" }
                           .uniq
rescue StandardError
  []
end