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

  • Home
  • SEARCH
  • 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 6616235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:33:31+00:00 2026-05-25T20:33:31+00:00

I was researching here on SO how to implement a tabbed interface in my

  • 0

I was researching here on SO how to implement a tabbed interface in my Rails app. For example, I like how Ryan Bates uses it in his Railscast overview page.

I want to mimic that in my Rails app so that a User’s profile has a navigation in it with two or three links. Clicking either link loads information using AJAX (I’m guessing). Then the URL shows /profiles/1/view?info or /profiles/1/view?otherdata

I came across this question, with the following solution:

I would make the contents of each tab be called in by a separate ajax request. This would give you the following benefits

  1. Now each tab can easily be a different view/controller
  2. You only need to load the contents for a tab when it is used; you won’t be processing code/downloading html for tabs that the user doesn’t use.

The problem is I’m new to Rails and have no idea how to do this. Can anyone point me to some resources that help explain how to set this up? I’d be tabbing between profile data and messages to the user.

Any help would be much appreciated.

  • 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-25T20:33:31+00:00Added an answer on May 25, 2026 at 8:33 pm

    As you’re new to Rails I’d suggest breaking up your goal into 2 sections: first, get the tabs working with simple content, then add the AJAX.

    Step 1 – Getting the tabs working

    Have a look at the JQuery UI tabs demos: http://jqueryui.com/demos/tabs/

    The code looks something like this:

    <div id="tabs">
      <ul>
        <li><a href="#tabs-1">Nunc tincidunt</a></li>
        <li><a href="#tabs-2">Proin dolor</a></li>
        <li><a href="#tabs-3">Aenean lacinia</a></li>
      </ul>
      <div id="tabs-1">
        <p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus.</p>
      </div>
      <div id="tabs-2">
        <p>Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc.</p>
      </div>
      <div id="tabs-3">
        <p>Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem.</p>
        <p>Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque.</p>
      </div>
    </div>
    
    <script>
      $(function() {
        $( "#tabs" ).tabs();
      });
    </script>
    

    Step 2 – Getting the AJAX working

    Check out: http://jqueryui.com/demos/tabs/#ajax

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

Sidebar

Related Questions

I have been researching asynchronous messaging, and I like the way it elegantly deals
I've spent a bit of time researching this on here and the mysql site
I've spent the last few evenings researching version control applications, mostly here on SO
Background: Here at the office my group uses a common linux environment where we
Currently I'm researching the best design pattern to implement for a windows form application
I am trying to implement RequestFactory and the Editor framework into my app. I'm
I've been researching this one and found references to similar problems here and there,
I've been researching how to implement a Namespace Extension. The NSE should show files
I am researching for my next android app project. ( My wife and I
Found this official ACS demo http://www.fabrikamshipping.com/ while researching on ACS. In the app itself,

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.