
Untitled
By: a guest on
Aug 17th, 2012 | syntax:
None | size: 0.74 KB | hits: 9 | expires: Never
# The controller method for the same is as below
def update_additional_details
@user = current_user
@user.profile.display_education_details(show_details_for_profile?(:education))
@user.profile.display_experience_details(show_details_for_profile?(:experience))
@user.profile.display_linkedin_details(show_details_for_profile?(:linkedin_profile))
@user.profile.detail[:linkedin_profile][:data] = params[:linkedin_profile_data]
if @user.profile.save
redirect_to additional_details_user_path(@user), :notice => _("successfully_updated")
else
# there are errors, do not redirect the user, just render the form (template) they just submitted
render 'edit' # or whatever template they were just looking at
end
end