Validating that a user-agreement checkbox has been checked

Hi,

I have a checkbox that a user must check before they register on my
site. It is to accept the terms of use. My question is, what
validation code do I need to add to my user model so that the record
can’t be saved until the box is checked?

Thanks, - Dave

On Feb 15, 2008 8:10 PM, [email protected]
[email protected] wrote:

Hi,

I have a checkbox that a user must check before they register on my
site. It is to accept the terms of use. My question is, what
validation code do I need to add to my user model so that the record
can’t be saved until the box is checked?

validates_acceptance_of


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Just thought that you’ve been asking a lot of questions on the mailing
list
lately and here’s a few things that might help you out:

You’ll get a quicker reply from the people on irc.freenode.net
#rubyonrails.
Many people from the mailing list are in here.

http://noobkit.com is a great lookup site if you don’t know what a
method
does.

Then there’s old faithful http://google.com too.

I did try sending this to your address but I got an instant error:

This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

[email protected]

Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 13): 550 [email protected]:
invalid address

On Sat, Feb 16, 2008 at 11:40 AM, [email protected] <
[email protected]> wrote:


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.

It’s an IRC server, get an IRC client like mirc http://mirc.com and then
type /server irc.freenode.net -j #rubyonrails into the bar at the bottom
after entering all your details.

Rick, Thanks. That was it.

Ryan, Yeah, I’ve probably overstayed my welcome somewhat. This is
such a great group but I should branch out. Is “irc.freenode.net
#rubyonrails” a newsgroup? I tried visiting the URL and
irc.freenode.net” but got a server not found error. Incidentally I
visit this through Google G…

  • Dave

On Feb 15, 8:35 pm, “Ryan B. (Radar)” [email protected]