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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:19:56+00:00 2026-05-11T09:19:56+00:00

From the documentation for link_to_remote The result of that request can then be inserted

  • 0

From the documentation for link_to_remote

The result of that request can then be inserted into a DOM object whose id can be specified with options[:update]. Usually, the result would be a partial prepared by the controller with render :partial.

For example, one would do this:

<%= link_to_remote( 'Some link text', :url => url, :method => method, :update => 'name_of_partial' %> 

Is there a way to pass a :locals hash to the partial (in the example above, ‘name_of_partial’) similar to when you would render it using ‘render :partial’?

  • 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. 2026-05-11T09:19:56+00:00Added an answer on May 11, 2026 at 9:19 am

    You don’t quite understand. The :update argument is the html id of the element that will have its contents replaced by the contents of the result of this ajax call.

    <div id='ajax_message'></div> <%= link_to_remote 'click me',                    :url => my_ajax_action_path,                    :update => 'ajax_message' %> 

    The partial in question is rendered in response to the ajax request in your controller.

    def my_ajax_action   @my_object = MyOobject.find(params[:id]) #or something   render :partial => 'my_object',          :locals => { :my_object => @my_object } end 

    The resulting response body is then shoved into your previously named element via the :update argument.

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

Sidebar

Related Questions

So I'm working on this class that's supposed to request help documentation from a
I'm loading HTML-formatted content into my app from a web service, then plugging that
From the official documentation: The reuse identifier is associated with a UITableViewCell object that
I couldn't figure out that from SASS documentation. For example I would like to
I can't seem to find any useful documentation from Microsoft about how one would
I have an external DLL whose source code is C#. From the documentation for
Using a delegate I can call any function asynchronously. From the documentation I understand
From the MSDN documentation: Synchronized supports multiple writing threads, provided that no threads are
I try to use autocomplete jquery-ui script, but from the documentation it's explain that
From the documentation of UITableView / UITableViewController: If you decide to use a UIViewController

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.