ruby-on-railsruby-on-rails-3simple-form

How do I generate a cancel button in simple_form?


I want to generate a cancel button using simple_form....but not quite sure how to do that.

<%= f.button :submit, :class => "btn btn-warning btn-small", :label => "Save Changes" %>
<%= f.button :cancel, :class => "btn btn-inverse btn-small", :label => "Cancel" %>

But the cancel button doesn't work.

How do I get that?


Solution

  • Should this be supported by simple form? I had a quick look at github and did not find anything related.

    How about link_to "Cancel", :back ?