Help with this error

I am getting undefined method `delayed_backend_active_record_job_path’
I want to redirect the user to _list_row.html.haml page when they click
on
a job_id link but somehow I am getting the above error

delayed_jobs_controller.rb

class Admin::DelayedJobsController < Admin::BaseController
load_and_authorize_resource :delayed_job, class: Delayed::Job

layout “admin”

def index
@toggle_stats_job = Delayed::Job.where(queue: ‘stats’).first
@jobs = Delayed::Job.where(“COALESCE(delayed_jobs.queue, ‘’) !=
‘stats’”).order(:run_at)
end

def show
if params[:id].present?
@jobs = Delayed::Job.where(“id = ?”),params[:id]
format.html { redirect_to admin_delayed_jobs_path(params[:id]) }
end

respond_to do |format|
  format.json { render(json: {payload: 

@delayed_job.handler}.to_json) }
format.html { redirect_to admin_delayed_jobs_path }
end
end

def destroy
@job = Delayed::Job.find(params[:id])
@job.destroy
redirect_to admin_delayed_jobs_path
end
end

index

= render partial: ‘admin/delayed_jobs/list’

**** _list.html.haml ****
= render partial: ‘admin/delayed_jobs/list_header’
[email protected] do |job|
= link_to job.id, job
= render({:partial => ‘admin/delayed_jobs/list_row’, locals:
{job:job}})

**** _list_row.html.haml ****
%td=job.priority
%td=job.attempts
%td=job.created_at
%td=job.run_at
%td=job.updated_at
%td=job.failed_at
%td=link_to “Delete”,admin_delayed_job_path(job), method: :delete

On 24 March 2015 at 09:44, Rails_beginner [email protected] wrote:

I am getting undefined method `delayed_backend_active_record_job_path’
I want to redirect the user to _list_row.html.haml page when they click on a
job_id link but somehow I am getting the above error

Which line of your code is generating the error (it should be given
with the error). If you can’t see it post the complete error and
stack trace.

Colin

On Tuesday, March 24, 2015 at 10:26:00 AM UTC, Rails_beginner wrote:

= render partial: ‘admin/delayed_jobs/list_header’
[email protected] do |job|
= link_to job.id, job

This will try to call delayed_backend_active_record_job_path in order to
turn the job object into the path (by default the class name is used to
select which route should be used). If it should be using something else
then you need to be explicit, e.g.

link_to job.id, admin_delayed_job_path(job)

if that is where it should go

Fred