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 3670252
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:20:31+00:00 2026-05-19T02:20:31+00:00

I created a new file in app/views/students called courses.html.erb Then I try to reference

  • 0

I created a new file in app/views/students called courses.html.erb

Then I try to reference it at app/views/students/show.html.erb:

<%= link_to ‘courses’, courses_student_path(@student) %>

However I am getting

undefined method `courses_student_path’ for #<#:0x1052d1648>

What step did I miss?

  • 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-05-19T02:20:31+00:00Added an answer on May 19, 2026 at 2:20 am

    Note that you never link to views. It is always some action in some controller which in turn renders that view. In this case your action is courses in students controller and you need to create a route for it.

    Assuming you already had :students resource defined in config/routes.rb:

    resources :students do
      get 'courses', :on => :member
    end
    

    This will give you urls like students/1/courses and route helpers courses_student_path and courses_student_url.

    http://guides.rubyonrails.org/routing.html#adding-more-restful-actions

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app has login, once the access is granted, it creates a new html
Basically what the title says. I created a new MVC application. I'm trying to
I have this in my controller. I need my view to generate some HTML,
I'm creating a new plugin for a jruby on rails application that will eventually
I continue with a MVC Web App, and now I'm between the concepts of
I am working on a django app. One part would involve uploading files (e.g.
I'm trying to create a basic navigation app using UINavigationController as root container for
I'm pretty new to Android but I have some experience (and a bit rusty
I am new at iPhone and still trying to understand everything. I added the
I had a clean working directory and brought in a clone from a Git

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.