Skip to content

Instantly share code, notes, and snippets.

@dLobatog
Created March 6, 2019 15:20
Show Gist options
  • Select an option

  • Save dLobatog/a13f4986285f59aaf775130bccccacc6 to your computer and use it in GitHub Desktop.

Select an option

Save dLobatog/a13f4986285f59aaf775130bccccacc6 to your computer and use it in GitHub Desktop.
class OpenshiftConnection < ApplicationRecord
attr_encrypted_options.merge!(key: ENV.fetch('OPENSHIFT_TOKENS_SECRET'))
belongs_to :account
validates :api_url, presence: true
validates :registry_api_url, presence: true
validates :username, presence: true
validates :token, presence: true
validates_associated :account
attr_encrypted :token
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment