I'm using OmniContacts gem to import contacts from yahoo and gmail to my app. Now the yahoo importer stop working.
I have the following actions on my controller:
def contacts_callback
@contacts = request.env['omnicontacts.contacts']
@importer = params[:importer]
if session[:draw_token]
@draw_token = session[:draw_token]
end
end
def import_failed
if session[:draw_token]
draw = Draw.find_by_token(session[:draw_token])
if draw != nil
session[:draw_token] = nil
redirect_to dashboard_draw_url(draw)
else
session[:draw_token] = nil
redirect_to root_path, alert: _('Draw not exists.')
end
else
redirect_to dashboard_show_invitation_email_friendship_url, alert: _('You have canceled the request.')
end
end
the routes:
get '/contacts/:importer/callback' => 'dashboard/invitation_email#contacts_callback'
get '/contacts/failure' => 'dashboard/invitation_email#import_failed'
But know when I try to import from yahoo I'm always enter to the import_failed action and I can't understand why.
Does anybody has an idea what is the problem.
Thanks in advance