From 68d55cbcd8477ee4191102b9abfa4a6e1481732e Mon Sep 17 00:00:00 2001 From: Beatrice Olivera Date: Wed, 29 Aug 2018 14:09:12 +0100 Subject: [PATCH] added chat room controllers --- app/controllers/chat_rooms_controller.rb | 6 ++++++ app/controllers/requests_controller.rb | 8 ++++++++ config/environments/production.rb | 2 +- test/controllers/chat_rooms_controller_test.rb | 7 +++++++ test/controllers/requests_controller_test.rb | 7 +++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 app/controllers/chat_rooms_controller.rb create mode 100644 app/controllers/requests_controller.rb create mode 100644 test/controllers/chat_rooms_controller_test.rb create mode 100644 test/controllers/requests_controller_test.rb diff --git a/app/controllers/chat_rooms_controller.rb b/app/controllers/chat_rooms_controller.rb new file mode 100644 index 0000000..f011b21 --- /dev/null +++ b/app/controllers/chat_rooms_controller.rb @@ -0,0 +1,6 @@ +class ChatRoomsController < ApplicationController + + def create + + end +end diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb new file mode 100644 index 0000000..d781786 --- /dev/null +++ b/app/controllers/requests_controller.rb @@ -0,0 +1,8 @@ +class RequestsController < ApplicationController + + def update + request.accepted = true + + # Create new Chat Room + end +end diff --git a/config/environments/production.rb b/config/environments/production.rb index c90a719..255da15 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -50,7 +50,7 @@ Rails.application.configure do config.action_cable.allowed_request_origins = [ '*' ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. diff --git a/test/controllers/chat_rooms_controller_test.rb b/test/controllers/chat_rooms_controller_test.rb new file mode 100644 index 0000000..5f545e2 --- /dev/null +++ b/test/controllers/chat_rooms_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ChatRoomsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/test/controllers/requests_controller_test.rb b/test/controllers/requests_controller_test.rb new file mode 100644 index 0000000..309c8e5 --- /dev/null +++ b/test/controllers/requests_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class RequestsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end