mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 10:42:11 +00:00
del
This commit is contained in:
18
app/controllers/connections_controller.rb
Normal file
18
app/controllers/connections_controller.rb
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -31,6 +31,7 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
|
||||
|
||||
private
|
||||
|
||||
def find_user
|
||||
|
||||
Reference in New Issue
Block a user