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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:39:18+00:00 2026-06-13T19:39:18+00:00

I’ve been trying to do this for two weeks and I am still stuck.

  • 0

I’ve been trying to do this for two weeks and I am still stuck. Now, my situation is this:

With no user session started, if I enter this url in the brower: http://localhost.../something?a=1&b=2 it shows the subscription with the attributes a = 1 and b = 2. Everything OK.

If I edit something of the subscription everything goes OK, but the problem is that the url changes to http://localhost.../subscription/id.

What I want is that when I modify something in the subscription the url must be http://localhos.../something?a=1&b=2 instead of the http://localhost.../subscription/id.

routes.rb

 …
 match "/something" => "subscriptions#show"
 …

subscription_controller.rb

…
def show
  @subscription = Subscription.find(params[:id] || Subscription.find_by_token_and_networkId!(params[:t], params[:nwk]))
…

I don’t want to became the /subscription/id url useless because I want to access it from another part of the webpage.

  • 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-13T19:39:19+00:00Added an answer on June 13, 2026 at 7:39 pm

    In the controller update method, try this before the closing tag:

    redirect_to :back
    

    Currently, you probably have something like:

    redirect_to @subscription
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to build this nav for weeks now and something always
For two weeks now I've been trying to implement Git at our office. Rather
I've been looking at this problem for about two weeks now and think it's
I've been trying to get this to work for weeks now, all to no
I have been trying to solve this problem for several weeks now and it
So, I have been trying to fix this for about two months. It all
I've been trying to make this calendar_date_picker to work for more than two days,
Been trying to find this online for a while now. I have a SDL_Surface
I've been stuck on this for about 2 weeks. I need help in the
I've been trying to deploy my website to dreamhost for the last two weeks.

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.