Sha256: d03e3279c89979573ce5231449d7ca47f47a7c90ba5a549a6e831800e65fea05

Contents?: true

Size: 390 Bytes

Versions: 9

Compression:

Stored size: 390 Bytes

Contents

module Arel
  module Middleware
    module ActiveRecordExtension
      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
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arel_toolkit-0.4.9 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.8 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.7 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.6 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.5 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.4 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.3 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.2 lib/arel/middleware/active_record_extension.rb
arel_toolkit-0.4.1 lib/arel/middleware/active_record_extension.rb