app/controllers/store/store_controller.rb in artfully_ose-1.3.0.pre3 vs app/controllers/store/store_controller.rb in artfully_ose-1.3.0.pre4
- old
+ new
@@ -1,10 +1,12 @@
class Store::StoreController < ActionController::Base
layout "storefront"
include CartFinder
before_filter :store_organization
+ before_filter :save_page_location
+
def store_organization
@store_organization ||= load_store_organization
end
#
@@ -22,7 +24,16 @@
elsif current_member
current_member.organization
else
nil
end
+ end
+
+ #
+ # We're saving all pages for the user
+ # so that if they use the modal to member login,
+ # devise will redirect back to what they were doing
+ #
+ def save_page_location
+ session[:continue] = request.original_url
end
end