Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

Who are the participants in securities lending?

Answered: 1 week ago

Question

8) Extra credit Write the 41 mux for F(A,B,C)=(0,2,3,5,7)

Answered: 1 week ago