about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-26 20:48:20 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-26 20:48:20 +0100
commit24646d57690ad36cf4caecab2eec5774bca7f699 (patch)
treee6118271d38a47edb6b7518ff5dacedb76cbf7f9 /app/controllers
parentf16b31f0773c2fd1122ff0ad98cb392e762f0d0b (diff)
Adding views for the profile and entry pages
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/profile_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/profile_controller.rb b/app/controllers/profile_controller.rb
index 42698f7c7..30bd1a6b6 100644
--- a/app/controllers/profile_controller.rb
+++ b/app/controllers/profile_controller.rb
@@ -1,7 +1,17 @@
 class ProfileController < ApplicationController
+  before_action :set_account
+
   def show
   end
 
   def entry
+    @entry = @account.stream_entries.find(params[:id])
+    @type  = @entry.activity_type.downcase
+  end
+
+  private
+
+  def set_account
+    @account = Account.find_by!(username: params[:name], domain: nil)
   end
 end