the basics of a working remember-me-logic-flaw completed :-)

This commit is contained in:
cktricky
2014-03-15 22:30:31 -04:00
parent 1f922916d2
commit 3a5818c493
3 changed files with 21 additions and 20 deletions
+11 -1
View File
@@ -13,7 +13,7 @@ class PayController < ApplicationController
pay.user_id = current_user.user_id
msg = true if pay.save!
respond_to do |format|
format.json {render :json => {:msg => :world} }
format.json {render :json => {:msg => msg } }
end
end
@@ -23,4 +23,14 @@ class PayController < ApplicationController
end
end
def destroy
pay = Pay.find_by_id(params[:id])
if pay.present? and pay.destroy
flash[:success] = "Successfully Deleted Entry"
else
flash[:error] = "Unable to process that request at this time"
end
redirect_to user_pay_index_path
end
end