the basics of a working remember-me-logic-flaw completed :-)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user