简体   繁体   中英

How do you add a beta code authentication to a rails site?

I have two different pages, one is to enter the beta code, and the other is to actually sign up. Before gaining access to the signup page one must first enter a correct beta key.

How can I check the input, when the user clicks the submit button, with a list of beta keys and then redirect to the sign up page. What I actually want to do is call a helper when the user clicks submit that is able to take the info from the beta code textbox.

What you're looking for is called whitelisting. See Whitelisting with devise for examples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM