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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:46:34+00:00 2026-05-13T16:46:34+00:00

I have a simple Rails app and for example purposes we’ll say I have

  • 0

I have a simple Rails app and for example purposes we’ll say I have a customer model. If I have 1000 customers and I’m on page 6 when I click to view the details on a specific customer, what would be the best method so when I click a “Return to list” link, that it takes me back to page 6 and possibly even does a scroll to an anchor that’s associated with the row that the customer was located on.

I’m using will_paginate and everything is very basic CRUD pages at the moment.

  • 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-13T16:46:34+00:00Added an answer on May 13, 2026 at 4:46 pm

    You need to specify the return page as a query parameter in the link_to method. By default will_paginate calls this parameter page.

    Something like:

    <%= link_to 'Return to list', :controller => 'customers', :page => 6 %>
    

    Or if you’re using RESTful routes:

    <%= link_to 'Return to list', customers_path(:page => 6) %>
    

    With an anchor:

    <%= link_to 'Return to list',
          customers_path(:page => 6, :anchor => 'customer15') %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have the simple rails blog app. And I have a custom
for example a have simple rails app with two models, users and books. now
I have a really simple Rails app. Basically an article with comments. I want
I have a very simple Rails app with a very simple relational database: Category
Simple rails app: I have 2 models, user and intro [which is simply a
I have a simple rails search implemented in my app. At the time I
I have a simple search working in my rails app, but it only searches
I have setup some simple associations in my rails app: resources :properties do resources
I have a simple rails app where user can send a mass email to
I am co-developing a simple web app in Rails 3.0.9 and I have realized

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.