Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created April 14, 2009 18:04
Show Gist options
  • Save sprite2005/95321 to your computer and use it in GitHub Desktop.
Save sprite2005/95321 to your computer and use it in GitHub Desktop.
def verify
@phone_number = current_user.phone_numbers.find(params[:id])
if @phone_number
begin
adhearsion = DRbObject.new_with_uri "druby://vipwithme.com:9050"
rescue
connection_error = true
end
if !connection_error
@phone_number.start_verification!
adhearsion.verify_number_request(@phone_number.id)
end
end
respond_to do |format|
format.js {
render :partial => 'verify', :locals => { :number => @phone_number }
}
end
rescue
flash[:error] = "An error occured"
render :inline => flash[:error], :status => 500 if flash[:error]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment