Created
February 22, 2015 17:19
-
-
Save mecampbellsoup/783306d8e27c8b5a10e8 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 | |
| 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