ruby on rails - Boolean checkbox needs to be accepted all the time even when checked -


i've put validation in checkbox tos_agreements, now, if it's checked, still gives me error "tos agreements need accepted".

what have is:

1.) i've added :tos_agreements devise permitted params in application controller

2.) i've validated this:

validates_acceptance_of :tos_agreement, :allow_nil => false, :accept => true

any idea? thanks!

i attr_accessor(of course in model of user):

attr_accessor :tos_agreement validates :tos_agreement, acceptance: true 

this validate checkbox tos_agreement checked, regards


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -