Rails: Devise: User
===

Environment: Rails 3.2.3 with Devise

I would like to add a registration code to the registration form. The registration code is NOT in the users table. There's a separate registration_codes for that. The reason it's in the registration form, is that I would like to compare the code entered by the user filling out the registration form to what's in the registration codes table, and produce a value that will go into the users table.

I am getting an error message:

    undefined method `registration_code' for #<User:0x007f91b57b7890>

and it's pointing to the code that displays the registration_code text box in views/registrations/new.html.erb

How do I get around the fact that registration_code is not part of the users table? The form was working fine, until I added the registration_code field to the form.