Differences betwen check_box_tag and check_box form helper


#1

What is the difference between the check_box_tag and the check_box form
helper?

I can’t understand why both must exist. :frowning:

Thanks.

Fernando L.


#2

Fernando L. wrote:

What is the difference between the check_box_tag and the check_box form
helper?

I can’t understand why both must exist. :frowning:
One (check_box) is specifically designed to work with ActiveRecord-style
objects, where an instance variable has persistent named data methods -
this works very nicely with Rails’ parameter string parsing. The other
(check_box_tag) can be used for anything.