I want to create a cancel button using simple_form .... but not quite sure how to do this.
<%= 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 does not work.
How do i get this?
If it is supported by a simple form? I quickly looked at github and did not find anything related.
How about link_to "Cancel", :back?
link_to "Cancel", :back
You can do this with bootstrapping.
<button type="submit" class="btn btn-default">Create Plan</button> <%= link_to "Cancel", :back, {:class=>"btn btn-default"} %>
simple_form erb:
<%= f.submit, 'Save', class: 'btn btn-primary' %> <%= f.button :button, 'Cancel', type: :reset, class: 'btn btn-none' %>
, , .
, Rails 3:
link_to "Cancel", @foo
@foo - . , , edit new.
@foo
edit
new
<%= button_tag "Cancel", :type => 'reset' %>