Module: Arel::Middleware::ActiveRecordExtension

Defined in:
lib/arel/middleware/active_record_extension.rb

Instance Method Summary collapse

Instance Method Details

#load_schema!Object



4
5
6
7
8
9
10
# File 'lib/arel/middleware/active_record_extension.rb', line 4

def load_schema!
  # Prevent Rails from memoizing an empty response when using `Arel.middleware.to_sql`.
  # Re-applying the middleware will use the database executor to fetch the actual data.
  Arel.middleware.apply(Arel.middleware.current) do
    super
  end
end