mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 18:52:11 +00:00
Merge branch 'master' into cross
This commit is contained in:
@@ -6,4 +6,8 @@ class ApplicationController < ActionController::Base
|
||||
def after_sign_in_path_for(resource)
|
||||
contacts_path
|
||||
end
|
||||
|
||||
def default_url_options
|
||||
{ host: ENV["HOST"] || "localhost:3000" }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
class ConnectionsController < ApplicationController
|
||||
def new
|
||||
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -10,9 +9,17 @@ class ConnectionsController < ApplicationController
|
||||
@connection.contact = contact_user
|
||||
|
||||
if @connection.save
|
||||
redirect_to contacts_path
|
||||
contact_message = nil
|
||||
if contact_user.first_name.nil? || contact_user.last_name.nil?
|
||||
contact_message = "#{contact_user.email}"
|
||||
else
|
||||
contact_message = "#{contact_user.first_name} #{contact_user.last_name}"
|
||||
end
|
||||
flash[:notice] = "Added #{contact_message} to contacts"
|
||||
redirect_to contacts_path
|
||||
else
|
||||
|
||||
flash[:alert] = "Invalid email address!"
|
||||
render 'new'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ class PagesController < ApplicationController
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
def cable_testing
|
||||
chatroom = 'chat_room_' + params[:chat_room_id]
|
||||
puts params
|
||||
|
||||
Reference in New Issue
Block a user