Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 17th, 2012  |  syntax: None  |  size: 0.74 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # The controller method for the same is as below
  2.  
  3.   def update_additional_details
  4.     @user = current_user
  5.     @user.profile.display_education_details(show_details_for_profile?(:education))
  6.     @user.profile.display_experience_details(show_details_for_profile?(:experience))
  7.     @user.profile.display_linkedin_details(show_details_for_profile?(:linkedin_profile))
  8.     @user.profile.detail[:linkedin_profile][:data] = params[:linkedin_profile_data]
  9.     if @user.profile.save
  10.       redirect_to additional_details_user_path(@user), :notice => _("successfully_updated")
  11.     else
  12.       # there are errors, do not redirect the user, just render the form (template) they just submitted
  13.       render 'edit' # or whatever template they were just looking at
  14.     end
  15.   end