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

  • Home
  • SEARCH
  • 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 8916841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:21:01+00:00 2026-06-15T05:21:01+00:00

Okay, so I am new to Rails and am creating a project management system

  • 0

Okay, so I am new to Rails and am creating a project management system with the framework. For a couple of my models, views, and controllers I used scaffolding and had no problems. For other parts, I coded all of the parts myself.

So as an overview of my project, at the root of it all you can have many projects. Within all of these projects you can create multiple to-do lists. Within each to-do list, you can have multiple tasks. This is what I meant by “hierarchical” in the title.

I just created my lists page, and when I go to the URL directly in my browser (ex: http://localhost:3000/projects/3/lists/20/tasks/1) the task is displayed correctly. However, I do not know how to format my link that is in one of my to-do list views (the tasks are usually shown below the to-do list but now I want them to show on their own view).

Here is the code I currently have:

<%= link_to "#{task.description}", project_list_tasks_url(@list.id,task.id) %>

I know that the link_to "#{task.description}" is correct because I tried using it with a static URL (Google or something), but project_list_tasks_url(@list.id,task.id) is where I’m having trouble.

Can anybody help me out? I can provide as much code as you’d like from my to-do list or task controllers and views.

  • 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-15T05:21:03+00:00Added an answer on June 15, 2026 at 5:21 am

    A couple of tips to help make routing less confusing. It can be a bit unnerving to get used to.

    Routing Rule #1

    Always check the output of rake routes to be sure how to call your various routing methods. You might think you know how your routes will play out by looking at routes.rb but you won’t know until you look at the compiled routes table.

    In your case you’re expecting a route with the format:

    /projects/:project_id/lists/:list_id/tasks/:id
    

    Be sure that’s the case. If it is, your call should look like:

    project_list_task_path(@project, @list, task)
    

    Note that the arguments here are :project_id, :list_id and :id, so all three are required in this case. Any in brackets in the path specification can be ignored, like :format usually is.

    Routing Rule #2

    Use the _path methods unless you strictly require the full URL. They’re shorter and the output is easier to read and debug. They also don’t inadvertently flip the URL in the browser and cause session problems if you don’t properly differentiate between www.mysite.com and site.com.

    Routing Rule #3

    Don’t forget there’s a huge difference between @project and @project.id when it’s supplied to a routing path method.

    The router will always call the to_param method if it’s available and this can be over-ridden in your model to produce pretty or friendly URLs. id is for your database and your database alone. to_param is for routing but you shouldn’t be calling it manually unless you’re doing something exceptionally irregular.

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

Sidebar

Related Questions

I am creating a new rails app as a learning project. I have already
Okay, so i have created a new support ticket system, but in my ticket
Okay so I am quite new to Rails and am trying to do the
Okay, this is a new one. I'm trying to debug my project, which I've
Okay, i am very very very new to Hibernate/Spring. I had to upgrade existing
Okay at the moment I my self am new to programming and learning it
Okay so I have started a new language in class. We are learning Scheme
Okay so I'm kind of new with OpenGL, but I thought I should learn
Okay, I'm very new to Java so please bear with me. I am using
Okay, I'm fairly new to R and I've tried to search the documentation for

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.