Skip to content

Instantly share code, notes, and snippets.

View fabioaraujo121's full-sized avatar
💭
Do cool things that matter

Fábio Araújo fabioaraujo121

💭
Do cool things that matter
  • Caruaru, Pernambuco, Brasil
View GitHub Profile
@fabioaraujo121
fabioaraujo121 / next_step.html.erb
Created August 29, 2019 17:44
[rails_admin] How to create a costum action with form? GET and POST
<!-- <root>/app/views/rails_admin/main/next_step.html.erb -->
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<%= form_tag(next_step_path, {method: :post}) do %>
<div class="form-group">
<label for="step">Próximo Passo:</label>
<%= select_tag "step", options_from_collection_for_select(@kind_steps, "id", "name"), prompt: "Selecione o Passo", class: "form-control", onchange: "this.form.submit();" %>
</div>
<% end %>