What is the best way to add a check for accepting terms of use in a rails app?
I can\'t seem to get validates_acceptance_of
working quite right. I added a b
In your model,
validates_acceptance_of :terms
If you're using attr_accessible
in your model then make sure you also add,
attr_accessible :terms
In your view,
<%= form_for @user do |f| %>
...
<%= f.check_box :terms %>
...
<% end %>
There is no need for an extra column in the users table unless you plan on denying access to users who have not accepted the terms of service, which won't exist since they can't complete registration in the first place.