This is because you place the footer inside the body. Use instead:
<%= simple_form_for [@state, @search] do |f| %> <div class="modal-body"> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button> <%= f.button :submit, :class => 'btn btn-primary' %> </div> <% end %>
source share