about summary refs log tree commit diff
path: root/app/controllers/accounts_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-29 19:42:08 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-29 19:42:08 +0100
commit0e8f59c16fcb21301c736ecbc4424cb4c5388c42 (patch)
tree344ac1e0b2d165ba4fe3870f786e854710970ce1 /app/controllers/accounts_controller.rb
parent11ff92c9d7b27c2c9ed86f649aef8d956cc8b989 (diff)
Refactoring Grape API methods into normal controllers & other things
Diffstat (limited to 'app/controllers/accounts_controller.rb')
-rw-r--r--app/controllers/accounts_controller.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
new file mode 100644
index 000000000..e96ef4a1c
--- /dev/null
+++ b/app/controllers/accounts_controller.rb
@@ -0,0 +1,16 @@
+class AccountsController < ApplicationController
+  before_action :set_account
+
+  def show
+    respond_to do |format|
+      format.html
+      format.atom
+    end
+  end
+
+  private
+
+  def set_account
+    @account = Account.find_by!(username: params[:username], domain: nil)
+  end
+end