summaryrefslogtreecommitdiff
path: root/users/app/controllers/keys_controller.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-11-21 12:15:03 -0800
committerjessib <jessib@riseup.net>2013-11-21 12:15:03 -0800
commitd82ea5da2aa705bcfa74f2a8b42a197883b694e3 (patch)
tree3b65497d551a611baa23791a3febce472eab0291 /users/app/controllers/keys_controller.rb
parent15b234bf798f3c6347f3c5a13fd1ddfdb744354d (diff)
Refactoring of code, and tests.
Diffstat (limited to 'users/app/controllers/keys_controller.rb')
-rw-r--r--users/app/controllers/keys_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/users/app/controllers/keys_controller.rb b/users/app/controllers/keys_controller.rb
new file mode 100644
index 0000000..9a39fc4
--- /dev/null
+++ b/users/app/controllers/keys_controller.rb
@@ -0,0 +1,10 @@
+class KeysController < ApplicationController
+
+ def show
+ user = User.find_by_login(params[:login])
+ # layout won't be included if we render text
+ # we will show blank page if user doesn't have key or user doesn't exist
+ render text: user ? user.public_key : ''
+ end
+
+end