I would use somethong like:
``` ruby
<%= form_for @role do |f| %>
  <%= base_errors_for @role %>

  <ul class="nav nav-tabs" data-tabs="tabs">
    <li class="active"><a href="#primary" data-toggle="tab"><%= _("Role") %></a></li>
    <li><a href="#filters" data-toggle="tab"><%= _("Filters") %></a></li>
  </ul>

  <div class="tab-content">
    <div class="tab-pane active" id="primary">
      <%= text_f f, :name, :class => @role.builtin? ? "disabled" : ""  %>
      <%= hidden_field_tag :original_role_id, @original_role_id if @cloned_role %>
    </div>
    <div class="tab-pane" id="filters" data-ajax-url='<%= filters_path(:role_id => @role) + " table" %>'>
        <p id="spinner">
          <%= image_tag 'spinner.gif' %>
          <%= _('Loading VM information ...') %>
        </p>
    </div>
  </div>

  <%= submit_or_cancel f %>
<% end %>
```