开发者

Customize devise sign_up

开发者 https://www.devze.com 2023-02-10 22:06 出处:网络
I\'m new to the rails world so this can be a stupid question, but I can开发者_运维问答not find the answer...

I'm new to the rails world so this can be a stupid question, but I can开发者_运维问答not find the answer...

when I access a link like that:

www.domain.com/users/sign_up?email=some@email.com

I would like to have my "e-mail" field filled in with this parameter(some@email.com, in this case)

Any ideas of how can I achieve this (using devise) ?

Thanks!

EDIT

The answer:

<%= text_field :email, :value => params[:email] %>


You must use the name of the email field which is user[email] so www.domain.com/users/sign_up?user[email]=some@email.com I hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消