Topic: Models with properties that are not stored in database

Hi,

I'm trying to make a model that is populated by a form and has some properties that are stored in the database and some properties that are just stored as instance variables and never saved to the database. The reason is that I am gathering credit card numbers from a form, sending them to paypal for processing and then storing one form field in the database but not the credit card information. Currently I use attr_accessor to create my ivars but I do not know how to take my object from the form and process it further before saving it to the database. Any suggestions?

Re: Models with properties that are not stored in database

In your controller you have access to all of the parameters that come in from the form.  Take a look at the log file output when you submit your form and you will see what there is.   You can then access these items by params[:whatever] and do what you need to with them.