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
Post a Comment