Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

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