Not sure how to update

Hello i ve been using RoR for about 3 weeks and i have create a very
simple app to keep track of my tasks. I am having some difficulties on 2
things…

First i have a column named ‘priority’ on the table ‘projects’ and i
want to be able to change the color of the entiry row (or at least the
cell) for that project. EX: i have 5 projects being displayed on a
table two of them are priority 1 and the rest are priority 4. I want to
be able to change the color of the row (or at least the cell) depending
on the priority on the project (1 = red, 2 = orange, 3 = yellow…
etc)… At the creation of the project i can specify the priority, but i
am not sure how to get that number from the SQL database and then
perform the if statements (if thats how it would be done)… Would this
need JavaScript…? AJAX…?

And second i have this check box linked to the ‘done’ column on the
‘projects’ table. The the i have the display set up is that it will
display everything that has ‘done = 0’ (or not done) so as soon i chekc
the done check box it disappears from the list of projects. However
there are 2 things i havent been able to figure out… How can i have a
prompt asking me if i am sure the project is done…? (similar to the
'destroy" action) And how can i create a timestamp, with the current
date and time, and saved into the ‘completed’ column…?

here is what i have for the check_box

list.rhtml:

<%= check_box("done", "short", "onclick" => "document.location.href='/project/toggle_done/#{project.id}'") %>

controller:
def toggle_done
project = Projects.find(@params[“id”])
project.done = !project.done?

            if project.save
                    redirect_to(:action => "list")
            else
                    render_text "Couldn't add new status"
            end
    end

Any inputs or ideas would be appriciated…

Thanks