mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Override redirect to index page when editing properties from edit page
This commit is contained in:
@@ -184,7 +184,7 @@ module Admin
|
||||
|
||||
# Overriding method on Spree's resource controller
|
||||
def location_after_save
|
||||
if params[:enterprise].key? :producer_properties_attributes
|
||||
if params[:enterprise].key? :producer_properties_attributes && request.referrer != main_app.edit_admin_enterprise_path(@enterprise)
|
||||
main_app.admin_enterprises_path
|
||||
else
|
||||
main_app.edit_admin_enterprise_path(@enterprise)
|
||||
|
||||
Reference in New Issue
Block a user