done
This commit is contained in:
parent
ebdad02216
commit
480fbbdbfb
|
@ -6,7 +6,8 @@ a:hover {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
a {
|
a {
|
||||||
align-self: flex-end;
|
align-self: center;
|
||||||
|
margin-top: 19px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +146,19 @@ a:hover {
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
margin-right: 8px;
|
||||||
|
margin-top: -46px;
|
||||||
|
float: right;
|
||||||
|
font-size: 27px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1;
|
||||||
|
color: #F55E4F;
|
||||||
|
text-shadow: 0 1px 0 #000;
|
||||||
|
opacity: 0.8;
|
||||||
|
filter: alpha(opacity=20);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,10 @@ class ConnectionsController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
connection = current_user.connections.find_by(contact_id: params[:id].to_i)
|
||||||
|
connection.destroy
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,4 +6,3 @@
|
||||||
|
|
||||||
<%= f.submit %>
|
<%= f.submit %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
|
||||||
|
|
|
@ -26,6 +26,10 @@ end
|
||||||
<i class="fas fa-phone"></i>
|
<i class="fas fa-phone"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<%= link_to connection_path(contact), method: :delete do %>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="close"><span aria-hidden="true">×</span></button>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
<%= render "pages/contact", contact: contact %>
|
<%= render "pages/contact", contact: contact %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="video-feed half">
|
<div class="video-feed half">
|
||||||
<div class="video-content">
|
<div class="video-content">
|
||||||
|
|
|
@ -42,6 +42,6 @@ Rails.application.routes.draw do
|
||||||
patch '/users/:id', to: 'users#update'
|
patch '/users/:id', to: 'users#update'
|
||||||
delete '/users/:id', to: 'users#destroy'
|
delete '/users/:id', to: 'users#destroy'
|
||||||
|
|
||||||
resources :connections, only: [:create, :new]
|
resources :connections, only: [:create, :new, :destroy]
|
||||||
#get '/add_contact', to: 'connections#create'
|
#get '/add_contact', to: 'connections#create'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue