public
Created

  • Download Gist
get_full_profile.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14
def get_full_profile
fprofile = FullProfile.find_by_user_id(current_user.id)
if fprofile.nil?
client = get_client
full_profile = client.profile(:fields => [:associations, :honors, :interests])
full_profile = full_profile.to_hash
new_full_profile = FullProfile.new(full_profile)
new_full_profile.user = current_user
new_full_profile.save
new_full_profile
else
fprofile
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.