Is it possible to use Simple Form (by: Plataformatec) without a model?
https://github.com/plataformatec/simple_form
You can use :symbol
as the first argument.
<%= simple_form_for :user, url: users_path do |f| %> <%= f.input :name, as: :string %> ... <% end %>
It will output something like this:
<form novalidate="novalidate" class="simple_form user" action="/users" accept-charset="UTF-8" method="post"> ... <div class="input string required user_name"> <label class="string required" for="user_name"> <abbr title="required">*</abbr> Name </label> <input class="string required" type="text" name="user[name]" id="user_name" /> </div> ... </form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With