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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:09:42+00:00 2026-05-21T19:09:42+00:00

This is the error: No route matches {:action=>send_to_client, :controller=>stages} It corresponds to this line:

  • 0

This is the error:

No route matches {:action=>"send_to_client", :controller=>"stages"}

It corresponds to this line:

<%= link_to "<span class='icon send-to-client-icon' title='Send to Client' id='send-to-client'> </span>".html_safe, send_to_client_stage_path(@stage), :id => stage.id, :confirm => "This will send #{stage.name.capitalize} to #{stage.client.email}. Are you sure you are ready?" %>

In this _show_table.html.erb

<%

if @upload != nil
    stage = @upload.stage
end

%>
<h1 class="panel-header">Images</h1>

<% if stage == nil %>
    <div class="images_menu">
        <%= link_to "<span class='icon send-to-client-icon' title='Send to Client' id='send-to-client'> </span>".html_safe, send_to_client_stage_path(@stage), :id => stage.id, :confirm => "This will send #{stage.name.capitalize} to #{stage.client.email}. Are you sure you are ready?" %>      
        <span class="icon compare-icon" data-url="<%= compare_stage_path(stage)%>" title="Compare Images" id="compare-images"> </span>
    </div>
<% end %>

Here is my routes.rb:

resources :stages do
    member do
      get :step
      get :compare
      get :send_to_client
    end
  end

The issue is that this partial _show_table.html.erb is in the view folder of my uploads model…not the stages model.

When I execute that link_to in the stages model, it works fine. Once I take it out into the uploads model it throws that error.

Why would that be the case ?

Edit1: Here is the send_to_client action of the stages controller:

def send_to_client
        stage = Stage.find(params[:id])
        ClientMailer.send_stage(stage).deliver
        if ClientMailer.send_stage(stage).deliver
            flash[:notice] = "Successfully sent to client."
            redirect_to("/")
        else
            flash[:notice] = "There were problems, please try re-sending."
            redirect_to("/")
        end
    end
  • 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-21T19:09:42+00:00Added an answer on May 21, 2026 at 7:09 pm

    Rails will raise an ActionController::RoutingError if you use send_to_client_stage_path(nil).

    You’re mixing up @stage and stage. If you don’t define @stage in the controller action, it will be nil and the error raises. In this case, just use @upload.stage.

    Like:

    <% if @upload.stage %>
      <%= link_to "...", send_to_client_stage_path(@upload.stage), :confirm => "..." %>
    <% end %>
    

    If you want to use @stage, just define it in the action with @stage = @upload.stage and use it instead of @upload.stage:

    <% if @stage %>
      <%= link_to "...", send_to_client_stage_path(@stage), :confirm => "..." %>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This error just started popping up all over our site. Permission denied to call
This error seems to just pop up now and again. It is not restricted
This error message appears on a colleague's machine when he tries to launch a
Came across this error today. Wondering if anyone can tell me what it means:
Has anyone run into this error message before when using a timer on an
I got this error today when trying to open a Visual Studio 2008 project
I get this error: Can't locate Foo.pm in @INC Is there an easier way
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
I am getting this error now that I hit version number 1.256.0: Error 4
I get this error on an update panel within a popupControlExtender which is within

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.