Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 670 Bytes

TODO.md

File metadata and controls

35 lines (25 loc) · 670 Bytes

TODOs

ShortCircuitHelper

Investigate extracting the short-circuit code out of Poll Everywhere's ApplicationPolicy into mixins that can simply be included. The ApplicationPolicy in the README can look like this:

class ApplicationPolicy
  class Filter
    include Moat::ShortCircuitHelper::Filter

    def initialize(user, scope)
      @user = user
      @scope = scope
    end

    private

    attr_reader :user, :scope
  end

  class Authorization
    include Moat::ShortCircuitHelper::Authorization

    def initialize(user, resource)
      @user = user
      @resource = resource
    end

    private

    attr_reader :user, :resource
  end
end