mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Redirect to enterprises index page after updating producer properties
This commit is contained in:
@@ -51,9 +51,13 @@ module Admin
|
||||
@enterprise_fees = EnterpriseFee.managed_by(spree_current_user).for_enterprise(@enterprise).order(:fee_type, :name).all
|
||||
end
|
||||
|
||||
# Overriding method on Spree's resource controller
|
||||
def location_after_save
|
||||
# Overriding method on Spree's resource controller
|
||||
main_app.edit_admin_enterprise_path(@enterprise)
|
||||
if params[:enterprise].key? :producer_properties_attributes
|
||||
main_app.admin_enterprises_path
|
||||
else
|
||||
main_app.edit_admin_enterprise_path(@enterprise)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
- content_for :page_title do
|
||||
= "#{@enterprise.name}:"
|
||||
Producer Properties
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user