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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:04:54+00:00 2026-06-07T04:04:54+00:00

So, I have the following link-to: <%= link_to(outing_add_guests_path, :class => ‘modal’) do %> <div

  • 0

So, I have the following link-to:

 <%= link_to(outing_add_guests_path, :class => 'modal') do %>
 <div id="notImportant"></div>
 <% end %>

When I click on it, Rails tells me that

No route matches {:controller=>"outings", :action=>"add_guests"}

However, here’s my routes file:

resources :outings do
  get "/add_guests" => "outings#add_guests"
  post "/add_guests" => "outings#add_guests"
  delete "/remove_guests" => "outings#remove_guests"
end

and the corresponding action from my Outings Controller:

def add_guests
    @outing_guest = OutingGuest.new(:outing_id => params[:outing_id])
    @outing_guest.user_id = params[:user_id]
    if @outing_guest.save
        flash[:notice] = "Guest added successfully"
        redirect_to({ :action => 'outing', :id => params[:outing_id] })
    else
        flash[:notice] = "Guest could not be added"
        redirect_to({ :action => 'outing', :id => params[:outing_id] })
    end
end

Is there any reason Rails would be unable to detect my controller or its actions?

EDIT: Here’s part of the results from rake routes

            outing_add_guests GET    /outings/:outing_id/add_guests(.:format)                outings#add_guests
                              POST   /outings/:outing_id/add_guests(.:format)                outings#add_guests
  • 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-07T04:04:55+00:00Added an answer on June 7, 2026 at 4:04 am

    I notice your link_to is not consistent with the other routes

    outing_add_guests_path
    outings_add_guests_path
    

    Did you do rake routes to verify that outing_add_guests_path exists?

    EDIT:

    Your rake routes shows you need an outing_id so your routes aren’t setup right (at least not for the POST). I’d fix them the way @RyanBigg is suggesting.

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

Sidebar

Related Questions

I have the following link which opens a jquery modal window: <div id='confirm-dialog'><a href='#'
I have the following link next to one of my products: <%= link_to(Delete, {:action
I have the following link: link_to(Toggle, /jobs/#{job.id}/toggle_is_money_paid, :remote => true) which toggles the is_money_paid
I have the following wrapper method for link_to : def link_to_with_current(text, link, condition, *args)
I have the following Rails link generating code (I have removed potentially 'industry secret'
I currently have the following link_to in my Rails application: <%= link_to 'Remove this
I have a Rails 3.1 application where the view has the following link: <%=
I have the following Web page: link to page . If you go to
I have the following script, which is working for the most part Link to
I have tried to do this refering to following link. http://skypher.com/index.php/2008/07/28/function-list-for-php/ But no success.

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.