On Friday, February 14, 2020 at 12:04:55 PM UTC-5, Walter Lee Davis wrote:
>
> Is your form set to the default of an Ajax submission, or did you add the 
> configuration flag to the form_with method call that makes it actually 
> redirect? If this was a redirect, the header would be 301, not 200. 
>
> Walter
>
> On Feb 14, 2020, at 9:59 AM, fugee ohu <fuge...@gmail.com <javascript:>> 
> wrote:
>
> 
> This is a redirect from my log, but page doesn't change I'm still on the 
> same page containing the form I submitted
>
> 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
> HTTP/1.1" 200 2542
> http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases
>
> -- 
> 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 rubyonra...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
     respond_to do |format|
      if @press_release.save
        format.html { redirect_to 
user_artist_press_releases_path(artist_id: params[:artist_id]), notice: 
'Press release was successfully created.' }
        format.json { render :show, status: :created, location: 
@press_release }
      else
        format.html { render 'user_press_releases/_form'}
        format.json { render json: @press_release.errors, status: 
:unprocessable_entity }
      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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/87ab8278-a0b0-467c-8cce-3af53460643e%40googlegroups.com.

Reply via email to