hotwired / turbo-rails

Use Turbo in your Ruby on Rails app
https://turbo.hotwired.dev
MIT License
2.08k stars 322 forks source link

missing partial error with 2.0.9 #684

Open Skulli opened 10 hours ago

Skulli commented 10 hours ago

Yesterday with version 2.0.8 and today with 2.0.9 i get the following error in my specs

ActiveAdmin::Comment DELETE /destroy returns http success
 Failure/Error: @comment.broadcast_remove_to(@comment.resource)

 ActionView::MissingTemplate:
   Missing partial active_admin/comments/_comment with {:locale=>[:de], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :haml, :arb, :jbuilder, :axlsx]}.

   Searched in:
     * "/home/runner/work/xxx/app/views"
     * "/home/runner/work/xxx/vendor/bundle/ruby/3.3.0/gems/devise-4.9.4/app/views"
     * "/home/runner/work/xxx/vendor/bundle/ruby/3.3.0/gems/activeadmin-3.2.5/app/views"
     * "/home/runner/work/xxx/vendor/bundle/ruby/3.3.0/gems/turbo-rails-2.0.9/app/views"
     * "/home/runner/work/xxx/vendor/bundle/ruby/3.3.0/gems/kaminari-core-1.2.2/app/views"
     * "/home/runner/work/xxx/vendor/bundle/ruby/3.3.0/gems/view_component-3.14.0/app/views"
     * "/home/runner/work/xxx/vendor/bundle/ruby/3.3.0/gems/actiontext-7.1.4/app/views"
  ./app/controllers/util/comments_controller.rb:55:in `destroy'

with a rollback, spec works fine. Seems to be, that the codes tries to load a partial for a remove operation.

Setup is ruby 3.3.5, rails 7.1.4

iperks commented 10 hours ago

We also get this, looking at the diff I don't see why the renderables are needed in the broadcast_remove_to.

seanpdoyle commented 6 hours ago

Is it possible for this to be resolved by https://github.com/hotwired/turbo-rails/pull/680?