Skip to content

Instantly share code, notes, and snippets.

@mecampbellsoup
Created February 22, 2015 17:19
Show Gist options
  • Select an option

  • Save mecampbellsoup/783306d8e27c8b5a10e8 to your computer and use it in GitHub Desktop.

Select an option

Save mecampbellsoup/783306d8e27c8b5a10e8 to your computer and use it in GitHub Desktop.
module Flyblade
class TermsOfServicePolicy
class << self
def current_version
OperatingPolicy.find_by_title("EULA / Terms of Service").try(:version) || "1.0.0"
end
end
def initialize(user)
@user = user
end
def accepted_current_version?
user.terms_of_service_version == current_version
end
private
attr_reader :user
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment