Skip to content

Instantly share code, notes, and snippets.

@marcamillion
Created July 12, 2011 04:25
Show Gist options
  • Save marcamillion/1077393 to your computer and use it in GitHub Desktop.
Save marcamillion/1077393 to your computer and use it in GitHub Desktop.
ruby-1.9.2-p0 > User
=> User(id: integer, email: string, encrypted_password: string, password_salt: string, reset_password_token: string, remember_token: string, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, username: string, first_name: string, last_name: string, created_at: datetime, updated_at: datetime, invitation_token: string, invitation_sent_at: datetime, plan_id: integer, current_state: string, confirmation_token: string, confirmed_at: datetime, confirmation_sent_at: datetime, space_used: integer, failed_attempts: integer, unlock_token: string, locked_at: datetime, trial_end_date: date, active_subscription: boolean)
def trial_will_almost_end?
if (self.trial_end_date - Date.today <= 3)
return true
else
return false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment