Sorry, `redirect_back fallback_location: root_path`. El vie., 18 oct. 2019 a las 23:08, Ariel Juodziukynas (<[email protected]>) escribió:
> You are using `redirect_to request.referrer` and referrer is nil if you > enter the url by hand. > > Use `redirect_back fallback: root_path` instead. > > El vie., 18 oct. 2019 a las 22:33, fugee ohu (<[email protected]>) > escribió: > >> >> >> On Friday, October 18, 2019 at 9:22:09 PM UTC-4, Ariel Juodziukynas wrote: >>> >>> Is the link doing a GET request or a POST request? make sure your route >>> matches GET requests too. >>> >>> El vie., 18 oct. 2019 a las 18:07, Colin Law (<[email protected]>) >>> escribió: >>> >>>> On Fri, 18 Oct 2019 at 19:33, fugee ohu <[email protected]> wrote: >>>> >>>>> >>>>> >>>>> On Friday, October 18, 2019 at 5:57:55 AM UTC-4, Colin Law wrote: >>>>>> >>>>>> On Fri, 18 Oct 2019 at 09:26, fugee ohu <[email protected]> wrote: >>>>>> >>>>>>> On one of my sites (in production) if I navigate to >>>>>>> https://<sitename>/set_locale/ko >>>>>>> the browser doesn't load the page but if I'm on the site and I click the >>>>>>> link for that url it works fine I was notified about the error by GSC >>>>>>> >>>>>> >>>>>> You haven't told us what you see in the rails log when you do that. >>>>>> I am sure you will have looked there before asking. >>>>>> Not that you have actually asked a question, just told us that you >>>>>> have this interesting occurrence. >>>>>> Also you haven't told us what is shown in the browser console when it >>>>>> happens. >>>>>> >>>>>> Colin >>>>>> >>>>>> >>>>> >>>>> Both browser console and log say 500 internal server error >>>>> >>>> >>>> Well that is why it doesn't show the page then. >>>> >>>> Colin >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ruby on Rails: Talk" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsU1QbNV6i6XQGqbOmAauz-Q9o5wXwx1831%3D1dv4yEcaw%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsU1QbNV6i6XQGqbOmAauz-Q9o5wXwx1831%3D1dv4yEcaw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> >> >> <li><span class="smaller-text"><%= link_to "한국어", >> set_locale_path(locale: "ko") %></span> >> >> >> get 'set_locale/:locale' => 'world#set_locale', as: 'set_locale' >> >> >> def set_locale >> I18n.locale = params[:locale] || "zh-TW" >> respond_to do |format| >> format.html { redirect_to request.referrer } >> end >> end >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rubyonrails-talk/401e2df8-b4dd-42fb-9721-39491be9bed3%40googlegroups.com >> <https://groups.google.com/d/msgid/rubyonrails-talk/401e2df8-b4dd-42fb-9721-39491be9bed3%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcCmb4ew_1LP2GzBUKpJ%2Bm%2BOL69JaDvoZQw1xSNMp%3DCSqw%40mail.gmail.com.

