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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:25:53+00:00 2026-06-12T01:25:53+00:00

Thanks for taking the time to read this! Well, this is what I am

  • 0

Thanks for taking the time to read this!

Well, this is what I am trying to do, I have Rails app that displays a table displaying some information in the database, and I need it to automatically reload the table (if possible in a partial reload, so I don’t have to reload the whole page.) When new data is added to the database.

Thanks in Advance!

  • 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-12T01:25:54+00:00Added an answer on June 12, 2026 at 1:25 am

    So that the table data can reload, you’ll have first to notify th client the content has changed, then actually reload the content. To achieve that you’ll have to use Javascript/Ajax on the client side :

    • add an action to your controller that returns the last updated
      timestamp in JSON
    • store the timestamp in a JS variable
    • every n seconds call the action so that you can compare the local and remote timestamps
    • use Ajax to replace your table partial with the updated one

    jQuery ships with Rails and will handle the Ajax part very efficiently. See jQuery.ajax and jQuery.replaceWith to replace the old content with the new one.

    On the controller action that provides the table, use a parameter so that you can disable the layout rendering when called from Ajax. This way the controller will only provide the relevant content (the view containing table).

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

Sidebar

Related Questions

Thanks for taking the time to read this. I have an unknown number of
Thanks everyone for taking the time to read this. I have styled my navigation
First, thanks in advance for taking the time to read through this. I have
thanks for taking the time to read this. I have a JavaScript (jQuery) navigation
First, thanks for taking the time to read this. I'm having some difficulties with
Thanks for taking the time to read this. I am trying to create a
Thanks for taking the time to read my post... I'm trying to extract some
thanks for taking the time out to read this post. I'm having trouble trying
Thanks for taking time to read this question. I am designing a 3-tier solution
Thanks for taking time to read my questions. I am having some basic doubts

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.