This commit is contained in:
Benjamin Myara
2018-08-31 15:06:42 +01:00
parent d0803e7e72
commit c67849c3dc
13 changed files with 80 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
class ConnectionsController < ApplicationController
def new
end
def create
@connection = Connection.new
@connection.user = current_user
contact_user = User.find_by(email: params[:user][:email])
@connection.contact = contact_user
if @connection.save
redirect_to contacts_path
else
end
end
end

View File

@@ -6,11 +6,15 @@ class PagesController < ApplicationController
end
def index
@contact = Connection.new
end
def home
end
def cable_testing
chatroom = 'chat_room_' + params[:chat_room_id]
puts params

View File

@@ -31,6 +31,7 @@ class UsersController < ApplicationController
end
private
def find_user