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
+12 -12
View File
@@ -1,12 +1,12 @@
class BenefitFormsController < ApplicationController
def index
@benefits = Benefits.new
end
def download
begin
begin
path = params[:name]
file = params[:type].constantize.new(path)
send_file file, :disposition => 'attachment'
@@ -14,7 +14,7 @@ class BenefitFormsController < ApplicationController
redirect_to user_benefit_forms_path(:user_id => current_user.user_id)
end
end
def upload
file = params[:benefits][:upload]
if file
@@ -22,23 +22,23 @@ class BenefitFormsController < ApplicationController
Benefits.save(file, params[:benefits][:backup])
else
flash[:error] = "Something went wrong"
end
end
redirect_to user_benefit_forms_path(:user_id => current_user.user_id)
end
=begin
=begin
# More secure version
def download
file_assoc = {"1" => "Health_n_Stuff.pdf", "2" => "Dental_n_Stuff.pdf"}
begin
begin
if file_assoc.has_key?(params[:name].to_s)
path = Rails.root.join('public', 'docs', file_assoc[params[:name].to_s])
if params[:type] == "File"
file = params[:type].constantize.new(path)
file = params[:type].constantize.new(path)
send_file file, :disposition => 'attachment'
end
else
end
else
file = Rails.root.join('public', 'docs', "Dental_n_Stuff.pdf")
send_file file, :disposition => 'attachment'
end
@@ -46,7 +46,7 @@ class BenefitFormsController < ApplicationController
redirect_to user_benefit_forms_path(:user_id => current_user.user_id)
end
end
=end
=end
end