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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:48:35+00:00 2026-05-18T04:48:35+00:00

In Rails 2, I used this kind of code to get a certain part

  • 0

In Rails 2, I used this kind of code to get a certain part of the page to update.

<div id="sidebar_div" class="span-3">
  <ul class="sidebar_list">
    <% for page in @section.pages %>
    <li><%= link_to_remote "#{page.name}", :update=>'show_page', :url => { :controller=>'pages',:action=>'show_page', :id=>page.id }, :html=>{} %></li>
    <hr/>
    <% end %>
  </ul>
</div>

<div id='show_page' class='span-18 last vert_divider'>
  <%= render :partial => 'pages/show', :locals => { :page=>@page } %>
</div>

In the controller pages, I had a show_page method that just rendered the partial again.

In Rails 3, I DON’T KNOW HOW TO ACCOMPLISH THIS. I want to use jQuery, which I already know how to code, but I don’t know how to get it working in this way. Should I create a js.erb file in my view? I watched the http://railscasts.com/episodes/205-unobtrusive-javascript but I still don’t know how to get it working to update one part of the page! Basically, I have this sidebar with links on it, and each time a user a clicks on one of them, the central part of the page should update – AJAX! How do I do this? Do I still need this show_page method in the controller?

  • 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-18T04:48:35+00:00Added an answer on May 18, 2026 at 4:48 am

    I came to an answer.
    http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/acfa800c83231c92
    xD

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

Sidebar

Related Questions

I am creating a rails app and have used this code in one of
I'm serving a semi-static site with rails, just to get used to rails conventions.
I just used this to switch my rails app db from sqlite3 to mysql2
I use sendmail to send emails from my ruby-on-rails app. I used this awesome
So I know that Rails helps protect against sql injections when used like this:
If I used this code to set up a tagging system for my app,
How to use cryptography with XML documents used for rails Active resources? Or, is
I used Heroku in the past with Rails 3.0.9 using sqlite3 in development (locally).
Have someone used Typus (admin plugin for rails) in Heroku ? http://intraducibles.com/projects/typus/install I follow
I used to think the db/schema.rb in a Rails project stored the database schema,

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.