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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:50:22+00:00 2026-05-25T22:50:22+00:00

Apologies if this is asked before, but I can’t find it… I’ve got a

  • 0

Apologies if this is asked before, but I can’t find it…

I’ve got a page with a button bar that I need to update as the state of the page changes. The button bar is rendered with a partial.

The user can update the state with various AJAX actions on the page, and I’m doing various updates to the required elements. Mostly these are simple text strings, but the button bar is a bit more complex.

I’d have thought I should be able to do some variation on:

$('.button_bar').html( '<%= render :partial => 'buttons.html.erb' %>' );

But I’d need to somehow escape the render output for use in a string. While searching I came across render_to_string, but that just gives undefined method in my application.

  • 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-25T22:50:22+00:00Added an answer on May 25, 2026 at 10:50 pm

    I am not sure if I understand right, but

     $('.button_bar').html( "<%= escape_javascript(render "buttons") %>" );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I apologise if this has been asked before but I can't find the info
Apologies if this has been asked before (I couldn't find the answer anywhere), but
Apologies if this has been asked before, but I could not find a question
(Apologies if this has been asked before - I can't believe it hasn't, but
Apologies if this question has been asked before. I'm hoping that someone can step
My apologies if this question has been asked before. I can see there are
Apologies if this was already asked but, I have had a look and can't
Apologies if this has been asked before but I really didn't know what to
I apologize if this question was asked already before but I could not find
Apologies if this has been asked already, I can't find the answer in the

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.