Module: SshkeyAware
- Extended by:
- ActiveSupport::Concern
- Included in:
- ConsoleController
- Defined in:
- app/controllers/sshkey_aware.rb
Instance Method Summary collapse
Instance Method Details
#sshkey_uploaded? ⇒ Boolean
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/sshkey_aware.rb', line 8 def sshkey_uploaded? @has_key = false if session[:has_sshkey] logger.debug " Hit has_sshkey cache #{session.inspect}" @has_keys = session[:has_sshkey] else key = Key.first :as => current_user @has_keys = key ? true : false session[:has_sshkey] = @has_keys end @has_key end |