Skip to content
This repository has been archived by the owner on Dec 2, 2018. It is now read-only.

Commit

Permalink
includes od in toggle_o/d json response
Browse files Browse the repository at this point in the history
  • Loading branch information
adagio committed Oct 8, 2014
1 parent 88c44fa commit b54f142
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/ods_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def toggle_od_response
@day = @od.day
@week = @day.week
respond_to do |format|
format.json { render 'days/day_week', status: :ok }
format.json { render 'ods/od_day_week', status: :ok }
end
end

Expand Down
9 changes: 9 additions & 0 deletions app/views/ods/od_day_week.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
json.od do
json.extract! @od, :id, :instant, :o, :d, :timekey, :created_at, :updated_at
end
json.day do
json.extract! @day, :id, :date, :oTotal, :dTotal, :wr, :week_id
end
json.week do
json.extract! @week, :id, :firstDay, :oAVG, :dAVG, :oMAX, :oMIN, :dMAX, :dMIN, :comment
end

0 comments on commit b54f142

Please sign in to comment.