module MedicalReleaseContext
  extend ActiveSupport::Concern

  def medical_releases
    policy_scope(MedicalRelease)
  end

  def set_medical_release
    medical_release_id = params[:medical_release_id] || params[:id]

    @medical_release = authorize medical_releases.find(medical_release_id)
  end
end
