From de48efcf2a6b5fb096fd209b1efea482f743c19c Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 22 Jan 2013 12:02:18 +0100 Subject: some basic webfinger routes, controller, presenters, views --- users/app/controllers/webfinger_controller.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 users/app/controllers/webfinger_controller.rb (limited to 'users/app/controllers') diff --git a/users/app/controllers/webfinger_controller.rb b/users/app/controllers/webfinger_controller.rb new file mode 100644 index 0000000..e86cd2d --- /dev/null +++ b/users/app/controllers/webfinger_controller.rb @@ -0,0 +1,15 @@ +class WebfingerController < ApplicationController + + layout false + + def host_meta + @host_meta = Webfinger::HostMetaPresenter.new(request) + end + + def search + username = params[:q].split('@')[0].to_s.downcase + + user = User.find_by_login(username) + @subject = Webfinger::UserPresenter.new(user, request) + end +end -- cgit v1.2.3