0

I've trying to send a email address at url but when my controller process it he cut of the ".com" and return "example@example"

someone know what happen?

My controller method who is responsable from bring email from the request params:

def email_params_from_request
  params.require(:email)
end

in my test suite the same issue happens

before { get check_account_email_path email }

this returns without the rest of adress

Input: URL/email/teste@teste.com

Output: "teste@teste"

  • 1
    It *might* be helpful if you add your routes declarations to your question - specifically the bit that is providing you with `check_account_email_path`. Also, I would speculate that the email address should be a query parameter on the url, not a url element. – jvillian Aug 25 '20 at 16:20

1 Answers1

0

Passing .com will make your application understand that this is a mime type. Just pass that as request body instead of URL parameter and you will be good to go. Don't do that with a GET because passing body through a GET is rather buggy.

ErvalhouS
  • 3,922
  • 1
  • 21
  • 36