adding case for error message being emmited
This commit is contained in:
parent
d89cb53e26
commit
dae9f6540b
1 changed files with 7 additions and 12 deletions
|
|
@ -46,7 +46,6 @@ class RequestsController < ApplicationController
|
|||
|
||||
begin
|
||||
@request = current_user.send_friend_request_to(rel_hash[:friend], aspect)
|
||||
|
||||
rescue Exception => e
|
||||
Rails.logger.debug("error: #{e.message}")
|
||||
flash[:error] = e.message
|
||||
|
|
@ -59,12 +58,8 @@ class RequestsController < ApplicationController
|
|||
flash[:error] = e.message
|
||||
end
|
||||
|
||||
if params[:getting_started]
|
||||
redirect_to getting_started_path(:step=>params[:getting_started])
|
||||
else
|
||||
|
||||
flash[:notice] = "we tried our best to send a message to #{account}" unless flash[:error]
|
||||
respond_with :location => aspects_manage_path
|
||||
return
|
||||
end
|
||||
redirect_to aspects_manage_path
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue