Created
February 22, 2015 17:01
-
-
Save mecampbellsoup/b1039e29c1ceb0fbd37e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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