divz
divz

Reputation: 7957

Hyperlink in ruby on rails not redirecting

I have a tab controller that contains two tabs.while clicking first tab(tab1) it will show a form field.I have a hyperlink in another page. what i want is when clicking the hyperlink it will show the form field contents of tab1. Here is the tab controller am using

<div class="tabbable">
      <ul class="nav nav-tabs" id="tab-set">
        <li class="active"><a data-toggle="tab" href="#tab1">Create</a></li>
        <li><a data-toggle="tab" href="#tab2">event</a></li> 
      </ul>
      <div class="tab-content" id="tab-content">
      <div id="tab1" class="tab-pane active">
      <form field..........>
      </div>
          <div id="tab2" class="tab-pane"> l </div>
      </div>
    </div>

Hyperlink using

<%= link_to "Create", "#tab1" %>

Upvotes: 1

Views: 94

Answers (1)

rony36
rony36

Reputation: 3339

try this:

<%= link_to "Create", "#", :anchor => "tab1"  %>

Upvotes: 2

Related Questions