Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started