diff --git a/app/controllers/admin/enterprises_controller.rb b/app/controllers/admin/enterprises_controller.rb index 8327c4f1cc..a4f4eea834 100644 --- a/app/controllers/admin/enterprises_controller.rb +++ b/app/controllers/admin/enterprises_controller.rb @@ -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 diff --git a/app/views/admin/producer_properties/index.html.haml b/app/views/admin/producer_properties/index.html.haml index b92c191e7d..2b4277b08d 100644 --- a/app/views/admin/producer_properties/index.html.haml +++ b/app/views/admin/producer_properties/index.html.haml @@ -1,4 +1,5 @@ - content_for :page_title do + = "#{@enterprise.name}:" Producer Properties