ethanp / trracker

Time Tracking Utility as Rails App
trracker.herokuapp.com
2 stars 0 forks source link

"Time spent so far" on task#show should update during the AJAX receipt of a new interval #56

Closed ethanp closed 9 years ago

ethanp commented 9 years ago

THIS IS WRONG

This will be a bit more work than I thought

  1. modify intervals_controller.create_from_ajax to return the extra data instead of just

    L59: render @interval

    basically, it should instead be

    L59: render interval_data

    where _interval_data.html.haml renders the @interval as exists, but also returns a

    %p#time-spent-so-far new_time_spent_so_far
  2. modify recordButtonPressed in tasks.js to utilize the extra data...waitaminute, see below
ethanp commented 9 years ago

I think all I have to do is add something along the lines of

"time-spent-so-far" :"<%= interval.task.time_spent_so_far %>",

to _interval.json.erb

ethanp commented 9 years ago

it still doesn't do anything when you delete an interval via ajax though...which is now #115