Skip to content

Commit a0a5078

Browse files
committed
Fix rendering of confirm_merge partial
- This change simplifies the partial naming by taking advantage of Rails' naming conventions and resolves the following error: ``` ActionView::MissingTemplate - Missing partial super_admin/users/_confirm_merge.html.erb with {:locale=>[:"en-CA", :en, :"en-GB"], :formats=>[:js, :html, :text, :css, :ics, :csv, :vcf, :vtt, :png, :jpeg, :gif, :bmp, :tiff, :svg, :webp, :mpeg, :mp3, :ogg, :m4a, :webm, :mp4, :otf, :ttf, :woff, :woff2, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :gzip, :docx, :turbo_stream], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder]}. ... app/controllers/super_admin/users_controller.rb:94:in `search' ``` - The prior `'super_admin/users/confirm_merge.html.erb'` code works with release`v4.2`, which uses Rails 6. However, it generates the following deprecation warning: ``` DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: super_admin/users/_confirm_merge.html.erb (called from search at /home/aaron/Documents/GitHub/roadmap_upstream/app/controllers/super_admin/users_controller.rb:94) ```
1 parent e5fc72b commit a0a5078

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/super_admin/users_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def search
9191
# WHAT TO RETURN!?!?!
9292
if @users.present? # found a user, or Users, submit for merge
9393
render json: {
94-
form: render_to_string(partial: 'super_admin/users/confirm_merge.html.erb')
94+
form: render_to_string(partial: 'confirm_merge')
9595
}
9696
else # NO USER, re-render w/error?
9797
flash.now[:alert] = 'Unable to find user'

0 commit comments

Comments
 (0)