Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8567385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:52:19+00:00 2026-06-11T17:52:19+00:00

Rake Routes lists: program_reports GET /programs/:program_id/reports(.:format) reports#index Yet putting this in a layout file

  • 0

Rake Routes lists:

program_reports GET    /programs/:program_id/reports(.:format)               reports#index

Yet putting this in a layout file (programs.html.erb)

<li><%= link_to "Reports", program_reports(@program_id) %></li>

gives me an error:

undefined method `program_reports' for #<#<Class:0x007fe98d44baf0>:0x007fe98d465ce8>

I don’t know if this matters, but note that the layout is part of a nested layout structure, and so the view is rendered with something like this:

respond_with @partocipants do |format|
  format.html {
    render layout: 'layouts/progtabs'
  }
end

Any idea what is wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:52:20+00:00Added an answer on June 11, 2026 at 5:52 pm

    The ‘program_reports’ route provides ‘program_reports_path’ and ‘program_reports_url’ to your views. Try:

    <li><%= link_to "Reports", program_reports_path(@program_id) %></li>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my routes should look like this: >rake routes GET /categories/:category_id/articles(.:format) {:controller=>articles, :action=>index} category_articles POST
In my rake routes I get: project_todos GET /project_todos(.:format) project_todos#index POST /project_todos(.:format) project_todos#create new_project_todo
from rake routes I get this in my application new_admin_session GET /admins/sign_in(.:format) {:controller=>devise/sessions, :action=>new}
I have this in my rake routes: {:subdomain=>/m/, :action=>destroy, :controller=>mobile/home} mobile_disclosures GET /disclosures(.:format) {:subdomain=>/m/,
rails 3.1 rake routes for admin/sections_contoller trigger_admin_section GET /admin/sections/:id/trigger(.:format) {:action=>trigger, :controller=>admin/sections} admin_sections GET /admin/sections(.:format)
Whenever I run a rake command (i.e. rake routes ) I get this error:
I have following from rake routes: user GET /users/:id(.:format) {:action=>show, :controller=>users} But when I
I have the following when I do rake routes next_post /users/next_post/:index(.:format) {:controller=>users, :action=>next_post} then,
I'm confused by my rake routes output. For an example (trimmed): profil GET /profil/:id(.:format)
rake routes: new_user_session GET /users/sign_in(.:format) {:action=>new, :controller=>devise/sessions} user_session POST /users/sign_in(.:format) {:action=>create, :controller=>devise/sessions} destroy_user_session DELETE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.