0

I am creating a user account system for a Rails app, and I am using Devise and Simple Form to handle user account creation. I have a static pages controller that will handle a terms and conditions page.

I would like to have Devise only create the user account if the user a checked a box saying that they have read the relevant terms and conditions, a bit like on every website you have to sign up for.

1 Answers1

0

You can simply add checkbox to your form. And then in controller, where you create your user, make check if checkbox checked or not.

As other, not recommended option, add field to your database(boolean), and validate it for presence of 1

sanny Sin
  • 1,555
  • 3
  • 17
  • 27
  • I'm using Devise, so the controllers aren't there for me. How would I modify the Devise controller to do this? –  May 14 '13 at 12:54
  • 2
    this is well explained here http://stackoverflow.com/questions/3546289/override-devise-registrations-controller – sanny Sin May 14 '13 at 13:33