mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Use spree url_helpers
This commit is contained in:
@@ -61,7 +61,7 @@ module Spree
|
||||
private
|
||||
|
||||
def location_after_save
|
||||
admin_product_images_url(@product)
|
||||
spree.admin_product_images_url(@product)
|
||||
end
|
||||
|
||||
def load_data
|
||||
|
||||
@@ -122,7 +122,7 @@ module Spree
|
||||
return if valid_payment_methods.include?(params[:payment_method][:type])
|
||||
|
||||
flash[:error] = Spree.t(:invalid_payment_provider)
|
||||
redirect_to new_admin_payment_method_path
|
||||
redirect_to spree.new_admin_payment_method_path
|
||||
end
|
||||
|
||||
def load_hubs
|
||||
|
||||
@@ -12,7 +12,7 @@ module Spree
|
||||
|
||||
def index
|
||||
@payments = @order.payments
|
||||
redirect_to new_admin_order_payment_url(@order) if @payments.empty?
|
||||
redirect_to spree.new_admin_order_payment_url(@order) if @payments.empty?
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
@@ -74,7 +74,7 @@ module Spree
|
||||
end
|
||||
|
||||
def location_after_save
|
||||
edit_admin_shipping_method_path(@shipping_method)
|
||||
spree.edit_admin_shipping_method_path(@shipping_method)
|
||||
end
|
||||
|
||||
def load_data
|
||||
|
||||
@@ -14,7 +14,7 @@ module Spree
|
||||
protected
|
||||
|
||||
def location_after_save
|
||||
admin_country_states_url(@country)
|
||||
spree.admin_country_states_url(@country)
|
||||
end
|
||||
|
||||
def collection
|
||||
|
||||
@@ -11,9 +11,9 @@ module Spree
|
||||
|
||||
def location_after_save
|
||||
if @taxonomy.created_at == @taxonomy.updated_at
|
||||
edit_admin_taxonomy_url(@taxonomy)
|
||||
spree.edit_admin_taxonomy_url(@taxonomy)
|
||||
else
|
||||
admin_taxonomies_url
|
||||
spree.admin_taxonomies_url
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ module Spree
|
||||
respond_with(@taxon) do |format|
|
||||
format.html do
|
||||
if redirect_to @taxonomy
|
||||
edit_admin_taxonomy_url(@taxonomy)
|
||||
spree.edit_admin_taxonomy_url(@taxonomy)
|
||||
else
|
||||
admin_taxonomies_url
|
||||
spree.admin_taxonomies_url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user