turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 428 forks source link

Turbolinks 3 Partial replacement not working #633

Closed devmarwen closed 8 years ago

devmarwen commented 8 years ago

I have this create action for a remote form

def create
  if @record.save
    redirect_to @record
  else
    render :new, change: "new_record"
  end
end

Here when the saving succeed, the redirect happens successfully using Turbolinks and I can see Turbolinks.visit('the_actual_url'); in the network panel. But when the saving fails, "nothing" happens, the response in the network panel is the rendered HTML page including the form with its errors. Somehow Turbolinks is not taking charge of the rendering

Thibaut commented 8 years ago

Are you using Turbolinks master in your Gemfile? The new version hasn't been released yet.

devmarwen commented 8 years ago

Yes. I'm using the master branch

devmarwen commented 8 years ago

It's Coming from the jbuilder 2.3.1 Gem. Updating it to 2.3.2 fixed the problem and Turbolinks works again like expected!