Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PaypalController < ApplicationController
- def save_paypal
- @freelance_profile = current_user
- if params[:freelance_profile][:paypal_email].blank?
- success = nil
- else
- success = @freelance_profile.update_attributes(:paypal_email => params[:freelance_profile][:paypal_email], :paypal_check => params[:freelance_profile][:paypal_check])
- end
- render :update do |page|
- if success
- UserNotifier.deliver_profile_pro_email_user(current_user)
- UserNotifier.deliver_profile_pro_email_admin(current_user)
- page << 'self.parent.location.reload(true)'
- page << 'Content.close_focused(true)'
- else
- page.replace_html( 'response_div', error_messages_for_with_localization('freelance_profile', :language=>get_local_language) )
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment