Use spree url_helpers

This commit is contained in:
Luis Ramos
2020-09-04 00:29:35 +01:00
parent a2435d29af
commit 1df7890a0d
7 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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