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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:01:26+00:00 2026-06-04T19:01:26+00:00

I am trying to generate a url in an actionmailer template. An example if

  • 0

I am trying to generate a url in an actionmailer template. An example if the url I want to generate is

http://0.0.0.0:3000/users/confirm/lNbQxzFukYtEEw2RMCA

Where the last segment is a hash to identify the user

However when I use this

<%= url_for(:controller => 'users', :action => 'confirm', :id => @user.confirmhash, :only_path => false) %>

It generates this

http://0.0.0.0:3000/assets?action=confirm&controller=users&id=ZOR3dNMls8533T8hJUfCJw

How can I get it to correctly format? I have no idea where ‘assets’ is coming from.

Is there an easier way to use named routes that I am missing?

  • 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-04T19:01:28+00:00Added an answer on June 4, 2026 at 7:01 pm

    I’ve found the answer. As I’m still learning I’ve missed the option to create a named route. So this this the path I’ve taken.

    In config/routes.rb

    match 'user/confirm/:id' => 'users#confirm', :as => :confirm_account
    

    Then in my action mailer template I’ve used

    <%= link_to "Confirm your account", confirm_account_url(@user.confirmhash) %>
    

    Which passes the :id into the controller action.

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

Sidebar

Related Questions

I'm trying to generate a chart via the following url: http://chart.apis.google.com/chart?chxl=0:|Mon|Tue|Wed|Thu|Fri|Sat|Sun&chxt=x&chbh=a,6,10&chs=320x225&cht=bvg&chco=A2C180&chds=0,95&chd=t:0,0,300,500,0,0,0&chtt=Test The values are
I am trying to generate a URL that contains a UNC path as one
I am trying to understand crc32 to generate the unique url for web page.
I am trying to output a simple link. This works great: $url = 'http://www.google.com';
I'm trying to dynamically generate root folder in a url that's in the body
I am trying to dynamically generate JavaScript with just a URL get request. I
I am trying to generate an URL for my pdf file stored on my
I'm trying to generate a share URL with get parameters and it's doing some
while trying to generate a proxy from this WebService (http://scdemo14.infor.com:9014/axis/services/wb:wsclocks-inbound?wsdl) I'm receiving this error
I am trying to use LINQ to generate my Sitemap. Each url in the

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.