From 24646d57690ad36cf4caecab2eec5774bca7f699 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 26 Feb 2016 20:48:20 +0100 Subject: Adding views for the profile and entry pages --- app/controllers/profile_controller.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/controllers/profile_controller.rb') 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 -- cgit