polyglot/app/controllers/connections_controller.rb

19 lines
340 B
Ruby
Raw Normal View History

2018-08-31 14:06:42 +00:00
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