Skip to content

Commit bcdbbc7

Browse files
committed
fix: Fix MissingTemplate error after Rails 8 upgrade
1 parent c4bab02 commit bcdbbc7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/simple_json/simple_json_renderable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def render_to_body(options)
2929
# use super when any of [:body, :plain, :html] exist in options
3030
return super if self.class::RENDER_FORMATS_IN_PRIORITY.any? { |key| options.key? key }
3131

32-
template_name = template_name(options[:template] || action_name)
32+
template_name = template_name(options[:template] || options[:action] || action_name)
3333
if options.key?(:json)
3434
process_options(options)
3535
@rendered_format = 'application/json; charset=utf-8'

0 commit comments

Comments
 (0)