gem - integrating sorcery in a checkoutprocess -


i'd integrate sorcery-gem achieve authentication while checking out in online shop. followed ryan bate's railscast episode 283 - authentication sorcery.

given vistor has put products in session[:cart] , wants checkout. clicks on "checkout" , railsapp checks if logged in. if not, redirected sessions#new , got log in.

the problem sorcery's #login session_reset , session[:cart] destroyed.

is there nifty solution that? can think of some, imho, dirty hacks creating new controller actions or trying save cart temporarily in database.

cheers, cs

just in session controller (the place call login):

temp_cart = session[:cart] login(…) session[:cart] = temp_cart 

this way you'll hand cart around session reset.

bests, jjs


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -