Clean up trailing and leading whitespace

This commit is contained in:
James Espinosa
2014-07-05 19:15:32 -05:00
parent 6ea16fbe18
commit 68e6a01743
75 changed files with 499 additions and 499 deletions
+9 -9
View File
@@ -1,7 +1,7 @@
class ScheduleController < ApplicationController
def create
message = false
if params[:schedule][:event_type] == "pto"
sched = Schedule.new(params[:schedule])
sched.date_begin, sched.date_end = format_schedule_date(params[:date_range1])
@@ -11,12 +11,12 @@ class ScheduleController < ApplicationController
message = true
end
end
respond_to do |format|
format.json {render :json => {:msg => message ? "success" : "failure" }}
end
end
def get_pto_schedule
begin
schedules = current_user.paid_time_off.schedule
@@ -29,17 +29,17 @@ class ScheduleController < ApplicationController
hash[:end] = s[:date_end]
jfs << hash
end
rescue
rescue
end
respond_to do |format|
format.json do
render :json => jfs.to_json
end
end
end
end
private
# Returns a two part array consisting of dates
# First value is the begin date and the second is the end date
def format_schedule_date(date_array)
@@ -50,10 +50,10 @@ class ScheduleController < ApplicationController
date = Date.strptime(s.strip, '%m/%d/%Y')
vals <<(date)
end
rescue ArgumentError
rescue ArgumentError
return []
end
return vals
end
end