Minor fixes

This commit is contained in:
magnolia-fan
2011-12-01 10:09:18 +04:00
parent f76dea062c
commit bc98085090
8 changed files with 50 additions and 26 deletions
+4 -3
View File
@@ -15,10 +15,11 @@ class TrackController < ApplicationController
render :json => { :result => :failed }
end
def report_unavailable
def report_available
track = Track.find(params[:id])
unless track.nil? or track.available
track.available = false
available = params[:available] == "false" ? false : true
unless track.nil?
track.available = available
track.save
return render :json => { :status => :success }
end