You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.
If a product in the catalog is not found (ie its listed and then after the page has loaded for the user the product gets removed for whatever reason) I redirect the user to the root_path using redirect_to root_path but since my homepage isn't a wiselinks-enabled it goes a bit wrong when I try to aply wiselinks to this process because it tries to load the root_path html in my #product_list container.
if request.wiselinks?
render js: "<script>window.location.href = '#{root_path}'</script>"
else
redirect_to root_path
end
but this just makes a large chunk of the page disappear (that would normally be replaced by wiselinks with the next page's content)...and then it redirects the browser to the root_path.
Is there a way to make wiselinks not remove the content before doing the redirect?
Alternatively, is there a way to leave the page content alone and just show my flash message ("Product not found")?
Is there a better/another way to deal with RecordNotFound?
Thanks
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If a product in the catalog is not found (ie its listed and then after the page has loaded for the user the product gets removed for whatever reason) I redirect the user to the
root_path
usingredirect_to root_path
but since my homepage isn't a wiselinks-enabled it goes a bit wrong when I try to aply wiselinks to this process because it tries to load theroot_path
html in my#product_list
container.I've seen #57 and tried using the following:
but this just makes a large chunk of the page disappear (that would normally be replaced by wiselinks with the next page's content)...and then it redirects the browser to the
root_path
.Is there a way to make wiselinks not remove the content before doing the redirect?
Alternatively, is there a way to leave the page content alone and just show my flash message ("Product not found")?
Is there a better/another way to deal with
RecordNotFound
?Thanks
The text was updated successfully, but these errors were encountered: