Forum: Ruby on Rails validates_acceptance_of problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Paul S. (Guest)
on 2006-04-07 12:31
(Received via mailing list)
I'm having some difficulties getting validates_acceptance_of to work.
No matter whether I tick the checkbox for my terms and conditions on
my form, it will not submit it and shows my error message.

in my model i have:

validates_acceptance_of   :agree_to_terms, :message => ""

in my view i have:

<%= error_message_on :user, :agree_to_terms, "You must agree to the
terms and conditions" %>
<label for="agree_to_terms" class="left">I agree to the <a
href="/terms">terms and conditions</a></label>
<%= f.check_box :agree_to_terms, 'class' => 'smallinput' %>

If anyone could shed some light on what i'm doing wrong it would be
greatly appreciated.

This topic is locked and can not be replied to.