From b16212a2e9c9f9f9560a770bbdcc49cd7a95a8d2 Mon Sep 17 00:00:00 2001 From: Zachary Chai Date: Tue, 18 Oct 2016 16:09:41 -0400 Subject: [PATCH] add links to personal room and root --- app/models/user.rb | 4 ++++ app/views/landing/index.html.erb | 24 ++++++++++++------------ app/views/layouts/application.html.erb | 4 ++-- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 0941600e..487fdcbc 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -11,4 +11,8 @@ class User < ApplicationRecord def self.twitter_username(auth_hash) auth_hash['info']['nickname'] end + + def room_url + "/rooms/#{username}" + end end diff --git a/app/views/landing/index.html.erb b/app/views/landing/index.html.erb index 13bee6ad..fbd82246 100644 --- a/app/views/landing/index.html.erb +++ b/app/views/landing/index.html.erb @@ -36,21 +36,21 @@ - + - + - -<% if current_user.nil? %> - -<% else %> -
Hello <%= current_user.name %>
-<%= link_to 'Logout', '/logout' %> -<% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index b6a5eddc..167c983b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -16,10 +16,10 @@ - + <%= yield %>