mysociety/alaveteli

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

Summary

Maintainability
A
0 mins
Test Coverage
class InfoRequest
  module Prominence
    # All requests in a state that would allow the request owner to view them.
    class VisibleToRequesterQuery
      def initialize(relation = InfoRequest)
        @relation = relation
      end

      def call
        @relation.where(prominence: %w(normal backpage requester_only))
      end
    end
  end
end