Allow request to specify a return value when calling user_passwords#edit

This commit is contained in:
Rob Harrington
2015-04-17 10:21:25 +10:00
parent 5940ff2b2c
commit afe77925ba
2 changed files with 26 additions and 7 deletions

View File

@@ -1,6 +1,8 @@
class UserPasswordsController < Spree::UserPasswordsController
layout 'darkswarm'
before_filter :set_admin_redirect, only: :edit
def create
self.resource = resource_class.send_reset_password_instructions(params[resource_name])
@@ -18,4 +20,10 @@ class UserPasswordsController < Spree::UserPasswordsController
end
end
end
private
def set_admin_redirect
session["spree_user_return_to"] = params[:return_to] if params[:return_to]
end
end