Answer the question
In order to leave comments, you need to log in
Ruby on Rails checkbox?
Hello friends.
How to organize a checkbox whose value will be stored in the database?
UPD
For example, when creating a post / new
, the "Show" checkbox will be used.
By default, it will be set, but it can be removed.
Let's say two blocks will be displayed on the main page.
One will include posts in which the checkbox is enabled, and the second in which the checkbox is unchecked...
Sorry for the crooked Russian, and for the noobsto, I'm just getting used to RoR, don't be angry :) I'm
interested in how to make the checkbox write the value 0/1 in base when adding or editing a post.
And also interested in how to filter posts by checkbox on / off ..
Thank you :)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question