79261241

Date: 2024-12-07 19:24:57
Score: 1
Natty:
Report link

I see @partial = "workbar_work". When render (partial: workbar_work, ...) is not found, the _workbar_work.html.erb file. Because it is inside the work folder

$('#workbar_switch').html("<%= j render(partial: "work/#{@partial}", :locals => {exercise: @exercise@}) %>");

or

You can set @partial = "work/#{permitted_params[:partial].to_s}"

$('#workbar_switch').html("<%= j render(partial: @partial, :locals => {exercise: @exercise@}) %>");

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @exercise
  • User mentioned (0): @partial
  • User mentioned (0): @exercise
  • Low reputation (0.5):
Posted by: LihnNguyen