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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:59:55+00:00 2026-05-12T10:59:55+00:00

Hi Currently i am working on a rails project . where i have to

  • 0

Hi Currently i am working on a rails project . where i have to reload a partial page .

For example Create action

 def create
    # Some transaction to the database 
   respond_to do |format|
     format.html {render :text => 'Add post' }
     format.js
   end
  end

In my views posts/create.js.rjs i would like to reload the users/_login.html.erb file
This contains the total number of posts or the post’s size , when it creates a new post its should reload the partial page _login.html.erb and display the posts incremented size

In create.js.rjs if i use page.reload it reloads the entire page , How to reload only the partial file _login.html.erb inside create.js.rjs .

  • 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-12T10:59:55+00:00Added an answer on May 12, 2026 at 10:59 am

    The code will look like:

      page.replace_html "login-block-id", :partial => "users/login"
    

    Where login-block-id is the id of element that wraps your login template

    Note that replace_html can accept the same arguments as render do.

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

Sidebar

Related Questions

Hello Ruby/Rails/Merb developers! Im currently working on a web project that will have a
we are currently working on a rails project that uses i18n and we have
I'm currently working on a Rails project, and have found times where it's easiest
I'm currently working on a small project using Ruby On Rails 3.2 to create
Currently I am working on project like web analytic using rails 3.2.3 I have
I'm currently working on a project in Ruby on Rails (in Eclipse) and my
im working in a project writen in ruby on rails and im currently using
I am currently working through Michael Hartl's Rails Tutorial while experimenting with some other
Background Currently, I am working on a Rails application. I have different products that
I'm currently working on my first rails project. I am trying to make a

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.