diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 525738f..56b54ae 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -14,6 +14,15 @@ def filter_users_status @users = @users.sample(maximum_length_user_list) end + def chat + if user_signed_in? + @room_messages = Room.global_chat_room.room_messages + render 'home/chat_page' + else + render 'index' + end + end + private def maximum_length_user_list diff --git a/app/views/home/chat_page.html.erb b/app/views/home/chat_page.html.erb new file mode 100644 index 0000000..5faa887 --- /dev/null +++ b/app/views/home/chat_page.html.erb @@ -0,0 +1,5 @@ +<%= stylesheet_link_tag 'home', media: 'all', 'data-turbolinks-track': 'reload' %> +<%= stylesheet_link_tag 'home_mobile', media: 'all', 'data-turbolinks-track': 'reload' %> + + +<%= render 'chat' %> diff --git a/app/views/home/dashboard.html+mobile.erb b/app/views/home/dashboard.html+mobile.erb index 063a8f6..583861e 100644 --- a/app/views/home/dashboard.html+mobile.erb +++ b/app/views/home/dashboard.html+mobile.erb @@ -3,25 +3,8 @@
-
-
+
<%= render 'users' %>
-
- <%= render 'chat' %> -
-
-
- -
\ No newline at end of file +
diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index da7a9fc..2acae9d 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -2,17 +2,16 @@