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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:09:25+00:00 2026-06-09T10:09:25+00:00

I have a view that uses link_to to pass parameters to a controller. The

  • 0

I have a view that uses link_to to pass parameters to a controller. The url is a variable. Something is not working. I’d appreciate any clues. Thanks!

<% url1 = dialogs_path(@dialogId) %>
<%= url1 %>
<%= link_to "Go!", url1(:uid1 => @uid1, :uid2 => @uid2), :id => "my_link" %>

url1 displays correctly. However, executing link_to crashes.

  • 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-09T10:09:28+00:00Added an answer on June 9, 2026 at 10:09 am

    You should use dialog_path(@dialogId) instead.

    You’re trying to view a particular object, it’s singular and what rails expects.
    Take a look here :
    http://guides.rubyonrails.org/routing.html#paths-and-urls

    The way you use url confuses me, try something like this :

    <%= link_to "Go!", dialog_path(@dialogId, :uid1 => @uid1, :uid2 => @uid2), :id => "my_link" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a controller's action and view page that uses a master page. The
I have a view model that is displayed in a view that uses uploadify.
I have a partial view that uses a Telerik MVC Grid, and it has
I have used a list view that uses a grid view in WPF. I
I have a custom view in my Android App that uses a ScaleGestureDetector.SimpleOnScaleGestureListener to
I have a website that uses JSP as its view technology (and Spring MVC
I have an SQL Server Reporting Services (SSRS) report, that uses a view. That
I have a QuerySet that I wish to pass to a generic view for
I have a nice RESTful controller in my Rails application that uses responds_to to
I wrote a content switcher script that uses dynamic URLs to pass parameters indicating

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.