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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:22:28+00:00 2026-05-24T02:22:28+00:00

I have a routing error that I simply cannot figure out! Its doing my

  • 0

I have a routing error that I simply cannot figure out! Its doing my head in, if anyone can suggest a solution that would be hugely appreciated.

I get the error:
ROUTING ERROR
No route matches {:action=>”create_from_template”, :controller=>”projects”}

from the following button:

<p><%= link_to "Create from template", create_from_template_project_path %></p>

In routes.rb I have:

  resources :projects do
    member do
      get 'create_from_template'
    end
  end

In class ProjectsController I have:

  def create_from_template
    #@project = Project.find(params[:template_id])
    #@project.clone
    redirect_to projects_path
  end

It also shows up when I do “rake routes”

create_from_template_project GET    /projects/:id/create_from_template(.:format) {:action=>"create_from_template", :controller=>"projects"}

Anyone have any idea why it isnt working?

EDIT: Actually maybe I have misunderstood the “member” nested resource routing rules. I wasnt passing in a project. I have changed the button from

to

   <p><%= link_to "Create from template", create_from_template_project_path(template_project) %></p>

and now it works. Thanks everyone that helped.

  • 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-24T02:22:29+00:00Added an answer on May 24, 2026 at 2:22 am

    If you dont need to pass project for creating template action,change button as:
    `

     <%= link_to "Create from template", create_from_template_projects_path %> 

    In routes, instead of

     member do 

    you should use

     collection do 

    If you use member do in routes.rb then you should pass project in the link_to as Prasvin has mentioned

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

Sidebar

Related Questions

I have a custom routing application that takes information for a route from google
I'm trying out ASP.NET MVC routing and have of course stumbled across a problem.
i have a quetion about MVC routing. I have a controller method that is
I have a CI application that uses .htaccess for URL routing. My basic setup
i have main application, on mvc, with sexy routing, ant etc. can i add
I have a few routing issues with my ASP.NET MVC2 website and was wondering
My goal is to have the url routing as following: http://www.abc.com/this-is-peter-page http://www.abc.com/this-is-john-page What is
I have to set some routing rules in my php application, and they should
I have a problem with a sample routing with the preview 5 of asp.net
In my routing I would like to have something like not found route handler.

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.