Q:

Checkbox for terms and conditions, without column in database

I need a "I accept terms of service" checkbox on a page, it has to be checked in order for the order to proceed.  It seems hence illogical to have a column in the database to match this (whether user has accepted or declined terms). 
I am using the form helper like this in my view:
<%= check_box("client", "terms") %>

And in my model:
validates_acceptance_of :terms

At the moment it is not working at all. 
This seems like a really common piece of code, yet I can't find it used anywhere without having the terms in the model.  Else I could use javascript to validate it, but would prefer to keep it all the in model. 

A:

This should work fine, without a database column or attr_accessor:
http://guides.rubyonrails.org/active_record_validations.html#acceptance
I would be inclined to check your params hash is as it should be i.e. that the 'terms' attribute is being passed within the 'client' hash, perhaps try adding raise params.inspect on your controller create action to help you debug? 

A:

What about having an attr_accessor :terms in your Client model?