Guest User

Untitled

a guest
Jul 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. class PaypalController < ApplicationController
  2. def save_paypal
  3. @freelance_profile = current_user
  4. if params[:freelance_profile][:paypal_email].blank?
  5. success = nil
  6. else
  7. success = @freelance_profile.update_attributes(:paypal_email => params[:freelance_profile][:paypal_email], :paypal_check => params[:freelance_profile][:paypal_check])
  8. end
  9.  
  10. render :update do |page|
  11. if success
  12. UserNotifier.deliver_profile_pro_email_user(current_user)
  13. UserNotifier.deliver_profile_pro_email_admin(current_user)
  14. page << 'self.parent.location.reload(true)'
  15. page << 'Content.close_focused(true)'
  16. else
  17. page.replace_html( 'response_div', error_messages_for_with_localization('freelance_profile', :language=>get_local_language) )
  18. end
  19. end
  20. end
  21.  
  22. end
Add Comment
Please, Sign In to add comment