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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:02:46+00:00 2026-06-02T23:02:46+00:00

I am attempting to increment a value stored in params[:id] when an input botton

  • 0

I am attempting to increment a value stored in params[:id] when an input botton is selected and store the original value when the user accessed the page. How do I approach accomplishing this?

I have successfully incremented the value but I am unsure of how to accomplish storing the original value?

  • 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-02T23:02:49+00:00Added an answer on June 2, 2026 at 11:02 pm

    There are several ways you could hang on to the value of “start” between requests. You could, as Matzi suggests, persist the value in the url as part of the query string between requests.

    link_to "next", your_path(start: params[:start], count: (params[:count].to_i + 1))
    

    You could also stick the value in the user’s session from the controller:

    session[:start] = params[:start]
    

    Then retrieve it with session[:start].

    You can also shove it in your own special cookie from the controller:

    cookies[:start] = params[:start]
    # or
    cookies.permanent[:start] = params[:start]
    

    Or you could save the params[:start] to the database if it was really important for that bit of data to persist.

    Hope that helps point you in the right direction.

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

Sidebar

Related Questions

I'm attempting to create an anti-bruteforcer for the login page on a website. Unfortunately,
I am attempting to use a custom workflow activity to auto-increment build numbers based
I am attempting to create a profile page that shows the amount of dwarves
Attempting the most basic example of Knockout.js possible on their documentation page: http://knockoutjs.com/documentation/observables.html Looks
Attempting to find printers / shares in Active Directory using C#. This is my
Attempting to run adt from an SSH session results in: Exception in thread main
Attempting to upload a video, and this is the response I get back (after
Attempting to use the data series from this example no longer passes the JSONLint
Attempting to make a NSObject called 'Person' that will hold the login details for
Attempting to implement a poor man's test of whether a process is still running

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.