Question: Ruby on rails ****There should be a field in the Task that allows it to be marked as completed this is what the professor wants
Ruby on rails
****There should be a field in the Task that allows it to be marked as completed this is what the professor wants
How can i create a checkbox for status. The status should read yes or no for completion. I already created a status checkbox but when i click on it it saves is as 1. How can I change so that it saves the word completted
So far i have this under form.html.erb but is showing up red cause i have error somewhere i think
and this in controller.rb
def edit end def complete_checkbox(result) if result == 1 status ='complete' else status ='not completed' end end

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
