Validates_acceptance_of problem

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” %>
I agree to the terms and conditions
<%= 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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs