mysociety/alaveteli

View on GitHub
app/models/info_request/prominence/embargoed_query.rb

Summary

Maintainability
A
0 mins
Test Coverage
class InfoRequest
  module Prominence
    class EmbargoedQuery
      def initialize(relation = InfoRequest)
        @relation = relation
      end

      def call
        @relation.includes(:embargo).
          where('embargoes.id IS NOT NULL').
            references(:embargoes)
      end
    end
  end
end