did a couple of things to the request page
This commit is contained in:
parent
31629f8115
commit
eb4153ec8f
3 changed files with 2 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ class RequestsController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
url = diaspora_url(params[:request][:destination_url])
|
url = diaspora_url(params[:request][:destination_url])
|
||||||
@request = current_user.send_friend_request_to(url) unless url.include?('@')
|
@request = current_user.send_friend_request_to(url) unless url.include?('@')|| url == ''
|
||||||
if @request
|
if @request
|
||||||
flash[:notice] = "a friend request was sent to #{@request.destination_url}"
|
flash[:notice] = "a friend request was sent to #{@request.destination_url}"
|
||||||
redirect_to requests_url
|
redirect_to requests_url
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,5 @@
|
||||||
= f.label :destination_url
|
= f.label :destination_url
|
||||||
= f.text_field :destination_url
|
= f.text_field :destination_url
|
||||||
|
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= f.submit
|
= f.submit
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
= f.error_messages
|
= f.error_messages
|
||||||
|
|
||||||
%p
|
%p
|
||||||
|
enter a diaspora url, diaspora username, or random email address:
|
||||||
= f.label :destination_url
|
= f.label :destination_url
|
||||||
= f.text_field :destination_url
|
= f.text_field :destination_url
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= f.submit
|
= f.submit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue