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
|
begin
|
||||||
@request = current_user.send_friend_request_to(rel_hash[:friend], aspect)
|
@request = current_user.send_friend_request_to(rel_hash[:friend], aspect)
|
||||||
|
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
Rails.logger.debug("error: #{e.message}")
|
Rails.logger.debug("error: #{e.message}")
|
||||||
flash[:error] = e.message
|
flash[:error] = e.message
|
||||||
|
|
@ -55,16 +54,12 @@ class RequestsController < ApplicationController
|
||||||
#socket to tell people this failed?
|
#socket to tell people this failed?
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
flash[:error] = e.message
|
flash[:error] = e.message
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:getting_started]
|
|
||||||
redirect_to getting_started_path(:step=>params[:getting_started])
|
flash[:notice] = "we tried our best to send a message to #{account}" unless flash[:error]
|
||||||
else
|
redirect_to aspects_manage_path
|
||||||
flash[:notice] = "we tried our best to send a message to #{account}" unless flash[:error]
|
|
||||||
respond_with :location => aspects_manage_path
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue