Rails +引导选项卡

I have a rails application that is using Bootstrap tabs. The default tab is a rails js.erb partial but I cant figure out how to get it to render without having to click the tab when the page loads.

The code for my tabs looks like:

<div id="artist_tabs" class="span12">
  <section class="widget widget-tabs">
    <header>
      <ul class="nav nav-tabs offset3">
        <li class="active"><%= link_to "Albums", albums_artist_path, 'data-toggle' => 'tab', :remote => true %></li>
        <li><%= link_to "Biography", artist_path(@artist), 'data-toggle' => 'tab', :remote => true %></li>
      </ul>
    </header>
    <div class="body tab-content">
      <div id="Albums" class="tab-pane active clearfix"></div>
      <div id="Biography" class="tab-pane"></div>
    </div>
  </section>
</div>

My question is what is the best way to have my default(active) tab render the partial when the page loads without having to click it?

I've tried including the code to render the partial in the content div like so:

<div id="Albums" class="tab-pane active clearfix">
  <%= render 'albums', :remote => true %>
</div>

But then it renders on all the tabs.

I think you are missing the active class in the tab-content div.

Here is an example:

<div class="container-fluid">
    <div class="row-fluid">
        <div class="span8 well">
            <ul class="nav nav-tabs">
                <li class="active"> <a href="#home" data-target="#home" data-toggle="tab">Home</a>

                </li>
                <li><a href="#profile" data-target="#profile" data-toggle="tab">Profile</a>

                </li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active fade in" id="home">home tab content</div>
                <div class="tab-pane" id="profile">profile tab content</div>
            </div>
        </div>
    </div>
</div>

DEMO

I fixed this issue by adding the following code to my javascript file:

$.ajax({
      url: "url to default link_to path",
      cache: false,
      success: function(html){

      }
  });

If there is a better way to do this, please post it.