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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:16:37+00:00 2026-06-05T21:16:37+00:00

another newbie-question regarding rails and bootstrap. I am using something like this: <div class=tabbable

  • 0

another newbie-question regarding rails and bootstrap.

I am using something like this:

<div class="tabbable tabs-left">
<ul class="nav nav-tabs">
    <li class="active"><a href="#tab1" data-toggle="tab">About us</a></li>
            <li><a href="#tab9" data-toggle="tab">Address</a></li>
</ul>
<div class="tab-content">
    <div class="tab-pane active" id="tab1">
        <%= render 'about_us' %>
    </div>
    <div class="tab-pane" id="tab9">
        <%= render 'address' %>
    </div>
</div>

My problem is that I render ‘address’ which includes a form. By submitting this form I end up in an different controller. After saving a new address with this controller I would like to redirect to this page and show the address tab.

The redirect command I tried was: redirect_to salon_path(@salon.id.to_s + “#tab9”)
This results in calling the url …/salons/1%23tab9. What I think I need its …/salons/1#tab9.

But maybe you are having a better solution how to choose one specific tab.

Using:

gem 'rails', '3.2.3'
gem 'bootstrap-sass', '2.0.3'.
  • 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-06-05T21:16:38+00:00Added an answer on June 5, 2026 at 9:16 pm

    I could figure it out myself, this post here brought me onto the right track: How to get Twitter-Bootstrap navigation to show active link?

    <div class="tabbable tabs-left">
    <ul class="nav nav-tabs">
        <li class="<%= 'active' if params[:tab] == 'tab1' %>"><a href="#tab1" data-toggle="tab">About us</a></li>
        <li class="<%= 'active' if params[:tab] == 'tab9' %>"> <a href="#tab9" data-toggle="tab">Address</a></li>
    </ul>
    
    <div class="tab-content">
        <div class="<%= if (params[:tab] == 'tab1' || !params[:tab])then 'tab-pane active'  else 'tab-pane' end%>" id="tab1">
            <%= render 'about_us' %>
        </div>
        <div class="<%= if params[:tab] == 'tab9' then 'tab-pane active'  else 'tab-pane' end%>" id="tab9">
            <%= render 'address' %>
        </div>
    </div>
    

    And in my example I call it like this:

    redirect_to salon_path(@salon.id, tab:"tab9")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Might be a newbie question. I have a code line like this: <div class=template
Another newbie question. I would like to be able to import a .CSV spreadsheet
Another newbie Ruby on Rails question: In my post view, I want to show
This is a newbie question: I have a pre-existing function that I would like
Well, I know this is another newbie question but I'm very frustrated and I'm
Hello friends a newbie question... The Issue is like this: I have a static
Another newbie question... The script (below) compares selected text in one div with some
Another .net newbie question I created a class that inherits System.Web.UI.Page with the intention
Yet another Lucene.net question by an extreme newbie to it. This time, I have
Another newbie question: What's the best way to store data in a Cocoa application

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.